[GH-ISSUE #656] cannot reply to an email - as $excluded is only a string array #433

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

Originally created by @cdreier on GitHub (Nov 27, 2022).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/656

🐛 Bugreport

when clicking reply to an email, the following error is thrown in the logs and the browser receives a 500 response

PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/share/cypht/modules/core/message_functions.php:161
Stack trace:
#0 /usr/local/share/cypht/modules/smtp/modules.php(1035): format_reply_address()
#1 /usr/local/share/cypht/lib/module.php(529): Hm_Output_compose_form_content->output()
#2 /usr/local/share/cypht/lib/modules_exec.php(101): Hm_Output_Module->output_content()
#3 /usr/local/share/cypht/lib/modules_exec.php(83): Hm_Module_Exec->process_result()
#4 /usr/local/share/cypht/lib/modules_exec.php(44): Hm_Module_Exec->run_output_module()
#5 /usr/local/share/cypht/lib/dispatch.php(237): Hm_Module_Exec->run_output_modules()
#6 /usr/local/share/cypht/lib/dispatch.php(191): Hm_Dispatch->process_request()
#7 /usr/local/share/cypht/site/index.php(50): Hm_Dispatch->__construct()

it does not appear on all mails, only for those that are sent with cypht -
for the mails who crash, the $excluded array only contains strings - so this line crashes

github.com/jasonmunro/cypht@96fcd8e615/modules/core/message_functions.php (L161)

Version & Environment

Rev: followed install instructions, last commit should be 1695f992a9163ff840efaf022ac192362cec2f2a
OS: own docker image based on khromov/alpine-nginx-php8

Steps to reproduce

  1. configured and setup cypht with imap auth
  2. send a mail from one account to another, both in cypth
  3. click "reply"
  4. ...
  5. Profit
Originally created by @cdreier on GitHub (Nov 27, 2022). Original GitHub issue: https://github.com/cypht-org/cypht/issues/656 ## 🐛 Bugreport when clicking reply to an email, the following error is thrown in the logs and the browser receives a 500 response ``` PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/share/cypht/modules/core/message_functions.php:161 Stack trace: #0 /usr/local/share/cypht/modules/smtp/modules.php(1035): format_reply_address() #1 /usr/local/share/cypht/lib/module.php(529): Hm_Output_compose_form_content->output() #2 /usr/local/share/cypht/lib/modules_exec.php(101): Hm_Output_Module->output_content() #3 /usr/local/share/cypht/lib/modules_exec.php(83): Hm_Module_Exec->process_result() #4 /usr/local/share/cypht/lib/modules_exec.php(44): Hm_Module_Exec->run_output_module() #5 /usr/local/share/cypht/lib/dispatch.php(237): Hm_Module_Exec->run_output_modules() #6 /usr/local/share/cypht/lib/dispatch.php(191): Hm_Dispatch->process_request() #7 /usr/local/share/cypht/site/index.php(50): Hm_Dispatch->__construct() ``` it does not appear on all mails, only for those that are sent with cypht - for the mails who crash, the `$excluded` array only contains strings - so this line crashes https://github.com/jasonmunro/cypht/blob/96fcd8e6156cec494b43626bf56577d9499db629/modules/core/message_functions.php#L161 ### Version & Environment Rev: followed install instructions, last commit should be `1695f992a9163ff840efaf022ac192362cec2f2a` OS: own docker image based on `khromov/alpine-nginx-php8` ### Steps to reproduce 1. configured and setup cypht with imap auth 2. send a mail from one account to another, both in cypth 3. click "reply" 4. ... 5. Profit
kerem 2026-02-25 21:35:00 +03:00
Author
Owner

@marclaporte commented on GitHub (Dec 7, 2022):

Thank you @cdreier

Do you think it could be related to https://github.com/jasonmunro/cypht/pull/651 by @capocasa ?

<!-- gh-comment-id:1341634229 --> @marclaporte commented on GitHub (Dec 7, 2022): Thank you @cdreier Do you think it could be related to https://github.com/jasonmunro/cypht/pull/651 by @capocasa ?
Author
Owner

@marclaporte commented on GitHub (Feb 19, 2023):

Can you confirm if replying from emails in these two places has the same behavior?
2023-02-19_015804

<!-- gh-comment-id:1435911215 --> @marclaporte commented on GitHub (Feb 19, 2023): Can you confirm if replying from emails in these two places has the same behavior? ![2023-02-19_015804](https://user-images.githubusercontent.com/1004261/219934027-b77c4de2-d3bd-4999-958a-60b70bb342e7.png)
Author
Owner

@marclaporte commented on GitHub (Nov 4, 2023):

This is over a year old. Please retest one or both of the following:

<!-- gh-comment-id:1793571338 --> @marclaporte commented on GitHub (Nov 4, 2023): This is over a year old. Please retest one or both of the following: - master: https://github.com/cypht-org/cypht - https://github.com/cypht-org/cypht/tree/1.4.x
Author
Owner

@marclaporte commented on GitHub (May 6, 2024):

@cdreier we now have 3 branches: https://github.com/cypht-org/cypht/wiki/Lifecycle

<!-- gh-comment-id:2097106547 --> @marclaporte commented on GitHub (May 6, 2024): @cdreier we now have 3 branches: https://github.com/cypht-org/cypht/wiki/Lifecycle
Author
Owner

@marclaporte commented on GitHub (Sep 28, 2024):

@cdreier Closing as outdated.

We now have revamped and official Docker:
https://hub.docker.com/r/cypht/cypht

Please use latest stable version: https://github.com/cypht-org/cypht/releases

<!-- gh-comment-id:2380406542 --> @marclaporte commented on GitHub (Sep 28, 2024): @cdreier Closing as outdated. We now have revamped and official Docker: https://hub.docker.com/r/cypht/cypht Please use latest stable version: https://github.com/cypht-org/cypht/releases
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#433
No description provided.