mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #734] PHP8 - Fatal error with some imap attachments? #459
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#459
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mcbmcb0 on GitHub (Jul 21, 2023).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/734
💬 Question
I've put this as a questions tho I think its a bug due to php making count types compulsory. but I don't know how to reliably reproduce it:
the offending code is:
for ($i=0;$i<count($struct['disposition']['attachment']);$i++) {I assume there are no attachments tho they are expected. This line has not been updated in the latest current release. I've hacked a quick fix until someone can replicate this and/or patch it:
for ($i=0;$i<count( is_countable($struct['disposition']['attachment']??null) ? $struct['disposition']['attachment']: [] );$i++) {thanks
@marclaporte commented on GitHub (Jul 23, 2023):
@josaphatim What do you think?
@josaphatim commented on GitHub (Jul 31, 2023):
@mcbmcb0, @marclaporte I couldn't really reproduce that by as error is clear I'll proposed a merge request
@marclaporte commented on GitHub (Sep 5, 2023):
@mcbmcb0 Please confirm the issue is solved in master.
@mcbmcb0 commented on GitHub (Sep 8, 2023):
Hi
while I still don't know how to force the error, the current master appears to work for me on php8.2 / debian 12.
thanks!
EDIT: but i do now notice:
PHP Warning: foreach() argument must be of type array|object, int given in /var/www/cypht/modules/imap/functions.php on line 1390, referer: https://XXXXXX/admin/cyphtunfortunately i haven't had time to look into it.
@josaphatim commented on GitHub (Sep 9, 2023):
This is the fix for it https://github.com/cypht-org/cypht/pull/759.
@marclaporte commented on GitHub (Sep 9, 2023):
@mcbmcb0 Please confirm the issue is solved in master.
@mcbmcb0 commented on GitHub (Sep 9, 2023):
yes, this issue now resolved. thanks