[GH-ISSUE #1450] 🐛 [Bug] Hm_Handler_send_scheduled_messages causes "Server Error" message #657

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

Originally created by @indridieinarsson on GitHub (Feb 15, 2025).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1450

🐛 Bug

On current master, I get regular "Server Error" popups in the browser, originating from the scheduled message ajax call.

Enabling the debug php.ini, I get the following in the php log:

cypht-1  | 127.0.0.1 -  15/Feb/2025:22:18:03 +0000 "POST /index.php" 200
cypht-1  | 172.22.0.12 - - [15/Feb/2025:22:18:03 +0000] "POST /?page=message_list&list_path=combined_inbox HTTP/1.1" 200 56 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
cypht-1  | NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Call to a member function connect() on null in /usr/local/share/cypht/modules/core/hm-mailbox.php:50
cypht-1  | Stack trace:
cypht-1  | #0 /usr/local/share/cypht/modules/smtp/modules.php(1580): Hm_Mailbox->connect()
cypht-1  | #1 /usr/local/share/cypht/lib/modules_exec.php(177): Hm_Handler_send_scheduled_messages->process(Array)
cypht-1  | #2 /usr/local/share/cypht/lib/modules_exec.php(155): Hm_Module_Exec->run_handler_module(Array, Array, 'Hm_Handler_send...', Array, Object(Hm_Redis_Session))
cypht-1  | #3 /usr/local/share/cypht/lib/dispatch.php(218): Hm_Module_Exec->run_handler_modules(Object(Hm_Request), Object(Hm_Redis_Session), 'ajax_send_sched...')
cypht-1  | #4 /usr/local/share/cypht/lib/dispatch.php(188): Hm_Dispatch->process_request()
cypht-1  | #5 /usr/local/share/cypht/site/index.php(53): Hm_Dispatch->__construct(Object(Hm_Site_Config_File))
cypht-1  | #6 {main}
cypht-1  |   thrown in /usr/local/share/cypht/modules/core/hm-mailbox.php on line 50
cypht-1  | 127.0.0.1 -  15/Feb/2025:22:18:03 +0000 "POST /index.php" 500
cypht-1  | 172.22.0.12 - - [15/Feb/2025:22:18:03 +0000] "POST /?page=message_list&list_path=combined_inbox HTTP/1.1" 500 5 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
cypht-1  | 127.0.0.1 -  15/Feb/2025:22:18:03 +0000 "POST /index.php" 200
cypht-1  | 172.22.0.12 - - [15/Feb/2025:22:18:04 +0000] "POST /?page=message_list&list_path=combined_inbox HTTP/1.1" 200 78 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0

Seems I have a smtp account not connected to a mailbox or something.

Version & Environment

62e91744b8

docker image (not relevant to the issue, though).

Originally created by @indridieinarsson on GitHub (Feb 15, 2025). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1450 ## 🐛 Bug On current master, I get regular "Server Error" popups in the browser, originating from the scheduled message ajax call. Enabling the debug php.ini, I get the following in the php log: ``` cypht-1 | 127.0.0.1 - 15/Feb/2025:22:18:03 +0000 "POST /index.php" 200 cypht-1 | 172.22.0.12 - - [15/Feb/2025:22:18:03 +0000] "POST /?page=message_list&list_path=combined_inbox HTTP/1.1" 200 56 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" cypht-1 | NOTICE: PHP message: PHP Fatal error: Uncaught Error: Call to a member function connect() on null in /usr/local/share/cypht/modules/core/hm-mailbox.php:50 cypht-1 | Stack trace: cypht-1 | #0 /usr/local/share/cypht/modules/smtp/modules.php(1580): Hm_Mailbox->connect() cypht-1 | #1 /usr/local/share/cypht/lib/modules_exec.php(177): Hm_Handler_send_scheduled_messages->process(Array) cypht-1 | #2 /usr/local/share/cypht/lib/modules_exec.php(155): Hm_Module_Exec->run_handler_module(Array, Array, 'Hm_Handler_send...', Array, Object(Hm_Redis_Session)) cypht-1 | #3 /usr/local/share/cypht/lib/dispatch.php(218): Hm_Module_Exec->run_handler_modules(Object(Hm_Request), Object(Hm_Redis_Session), 'ajax_send_sched...') cypht-1 | #4 /usr/local/share/cypht/lib/dispatch.php(188): Hm_Dispatch->process_request() cypht-1 | #5 /usr/local/share/cypht/site/index.php(53): Hm_Dispatch->__construct(Object(Hm_Site_Config_File)) cypht-1 | #6 {main} cypht-1 | thrown in /usr/local/share/cypht/modules/core/hm-mailbox.php on line 50 cypht-1 | 127.0.0.1 - 15/Feb/2025:22:18:03 +0000 "POST /index.php" 500 cypht-1 | 172.22.0.12 - - [15/Feb/2025:22:18:03 +0000] "POST /?page=message_list&list_path=combined_inbox HTTP/1.1" 500 5 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" cypht-1 | 127.0.0.1 - 15/Feb/2025:22:18:03 +0000 "POST /index.php" 200 cypht-1 | 172.22.0.12 - - [15/Feb/2025:22:18:04 +0000] "POST /?page=message_list&list_path=combined_inbox HTTP/1.1" 200 78 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0 ``` Seems I have a smtp account not connected to a mailbox or something. ### Version & Environment 62e91744b8348420150b090e231528e9ce2c893e <!-- Specify your OS and OS Version here if the issue is (most likely) platform dependent. --> docker image (not relevant to the issue, though).
kerem 2026-02-25 21:35:36 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@amaninyumu1 commented on GitHub (Feb 21, 2025):

https://github.com/cypht-org/cypht/pull/1454

<!-- gh-comment-id:2674286771 --> @amaninyumu1 commented on GitHub (Feb 21, 2025): https://github.com/cypht-org/cypht/pull/1454
Author
Owner

@Baraka24 commented on GitHub (Mar 10, 2025):

@indridieinarsson can you confirm this fixed the issue so we close this ?

<!-- gh-comment-id:2709949870 --> @Baraka24 commented on GitHub (Mar 10, 2025): @indridieinarsson can you confirm this fixed the issue so we close this ?
Author
Owner

@indridieinarsson commented on GitHub (Mar 10, 2025):

yes, fixed now.

<!-- gh-comment-id:2710123998 --> @indridieinarsson commented on GitHub (Mar 10, 2025): yes, fixed now.
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#657
No description provided.