Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings with PHP 8.3 #1434

Open
s22-tech opened this issue Jan 28, 2025 · 4 comments
Open

Warnings with PHP 8.3 #1434

s22-tech opened this issue Jan 28, 2025 · 4 comments
Assignees

Comments

@s22-tech
Copy link

After successfully installing Cypht under 8.3, I'm seeing these warnings.

This warning gets produced every minute:

PHP Warning: Undefined array key "list_page" in /path/to/cypht/modules/imap/handler_modules.php on line 1331

I changed this line:

$list_page = (int) $this->request->get['list_page'];

to:

$list_page = (int) $this->request->get['list_page'] ?? null;

but it still produced the same warning. So I changed it to this:

$list_page = intval($this->request->get['list_page'] ?? null);

and the warnings stopped.

Same with this one:

PHP Warning: Undefined array key "list_page" in /path/to/cypht/modules/imap/handler_modules.php on line 2089

$list_page = intval($this->request->get['list_page'] ?? 1);

I didn't experience a problem with other similar lines in this file, but you may want to do the same thing to lines 734 and 1270.


When navigating to the Snoozed screen, "Server Error" shows on the screen twice, and also produces this error:

PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /path/to/cypht/modules/imap/functions.php:1612
Stack trace:
#0 /path/to/cypht/modules/imap/handler_modules.php(2119): getCombinedMessagesLists()
#1 /path/to/cypht/lib/modules_exec.php(177): Hm_Handler_imap_folder_data->process()
#2 /path/to/cypht/lib/modules_exec.php(155): Hm_Module_Exec->run_handler_module()
#3 /path/to/cypht/lib/dispatch.php(218): Hm_Module_Exec->run_handler_modules()
#4 /path/to/cypht/lib/dispatch.php(188): Hm_Dispatch->process_request()
#5 /path/to/cypht/site/index.php(53): Hm_Dispatch->__construct()
#6 {main}
  thrown in /path/to/cypht/modules/imap/functions.php on line 1612

When navigating to any screen, except Calendar or Compose, "Server Error" will flash briefly on screen but it doesn't seem to produce an error.


And here are 2 more that I couldn't resolve:

PHP Warning: Undefined variable $imap in /path/to/cypht/modules/imap/handler_modules.php on line 1149

PHP Warning: Attempt to read property "folder_state" on null in /path/to/cypht/modules/imap/handler_modules.php on line 1149

@marclaporte
Copy link
Member

@Baraka24 @amaninyumu1 @Bienvenumoringa @christer77 @IrAlfred

Who can take on this on?

@marclaporte
Copy link
Member

Thank you @s22-tech for this report and #1431

@christer77
Copy link
Member

@Baraka24 @amaninyumu1 @Bienvenumoringa @christer77 @IrAlfred

Who can take on this on?

@Baraka24 @amaninyumu1 @Bienvenumoringa @christer77 @IrAlfred

Who can take on this on?

Can I?

@christer77
Copy link
Member

Here's my constant, being positioned in Flag, the request "ajax_imap_filter_by_type" is sent and it waits for a GET parameter "list_page" that was not allowed in setup.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants