[GH-ISSUE #1434] Warnings with PHP 8.3 #652

Closed
opened 2026-02-25 21:35:36 +03:00 by kerem · 5 comments
Owner

Originally created by @s22-tech on GitHub (Jan 28, 2025).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1434

Originally assigned to: @christer77 on GitHub.

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

Originally created by @s22-tech on GitHub (Jan 28, 2025). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1434 Originally assigned to: @christer77 on GitHub. 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
kerem closed this issue 2026-02-25 21:35:36 +03:00
Author
Owner

@marclaporte commented on GitHub (Jan 28, 2025):

@Baraka24 @amaninyumu1 @Bienvenumoringa @christer77 @IrAlfred

Who can take on this on?

<!-- gh-comment-id:2617465736 --> @marclaporte commented on GitHub (Jan 28, 2025): @Baraka24 @amaninyumu1 @Bienvenumoringa @christer77 @IrAlfred Who can take on this on?
Author
Owner

@marclaporte commented on GitHub (Jan 28, 2025):

Thank you @s22-tech for this report and https://github.com/cypht-org/cypht/issues/1431

<!-- gh-comment-id:2617542165 --> @marclaporte commented on GitHub (Jan 28, 2025): Thank you @s22-tech for this report and https://github.com/cypht-org/cypht/issues/1431
Author
Owner

@christer77 commented on GitHub (Jan 28, 2025):

@Baraka24 @amaninyumu1 @Bienvenumoringa @christer77 @IrAlfred

Who can take on this on?

@Baraka24 @amaninyumu1 @Bienvenumoringa @christer77 @IrAlfred

Who can take on this on?

Can I?

<!-- gh-comment-id:2617764332 --> @christer77 commented on GitHub (Jan 28, 2025): > [@Baraka24](https://github.com/Baraka24) [@amaninyumu1](https://github.com/amaninyumu1) [@Bienvenumoringa](https://github.com/Bienvenumoringa) [@christer77](https://github.com/christer77) [@IrAlfred](https://github.com/IrAlfred) > > Who can take on this on? > [@Baraka24](https://github.com/Baraka24) [@amaninyumu1](https://github.com/amaninyumu1) [@Bienvenumoringa](https://github.com/Bienvenumoringa) [@christer77](https://github.com/christer77) [@IrAlfred](https://github.com/IrAlfred) > > Who can take on this on? Can I?
Author
Owner

@christer77 commented on GitHub (Jan 28, 2025):

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

<!-- gh-comment-id:2617780513 --> @christer77 commented on GitHub (Jan 28, 2025): 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
Author
Owner

@christer77 commented on GitHub (Mar 26, 2025):

hello @s22-tech,

can you close this issue if is resolved here

<!-- gh-comment-id:2753386094 --> @christer77 commented on GitHub (Mar 26, 2025): hello @s22-tech, can you close this issue if is resolved [here](https://github.com/cypht-org/cypht/issues/1481)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#652
No description provided.