You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PHP ERROR: Array to string conversion [pid 91211 on line 744 of "/var/www/horde6rc/vendor/horde/imap_client/lib/Horde/Imap/Client/Base.php"] #94
The warning is raised in Horde_Imap_Client_Base::getNamespaces() (horde/imap_client), not in IMP itself:
$additional = array_map('strval', $additional);
IMP always forwards the backend namespace setting from backends.php / backends.local.php as that $additional argument. strval() on a nested array value triggers PHP’s “Array to string conversion” warning (and turns the value into the literal string "Array").
That matches “shows up in the log without any noticeable side effects”: the bogus "Array" name is probed as an unadvertised namespace, does not match anything useful, and is otherwise ignored — but the warning is logged on every call because the strval runs before the namespace cache lookup.
Documented shape for the IMP backend option is a flat list of UTF-8 strings, e.g.:
A nested / associative form such as '#shared/' => array('delimiter' => '/') (or any other non-string element) is enough to produce this warning.
Workaround
Please check the 'namespace' entry in your IMP backends.local.php and reduce it to a flat list of strings as above (or remove the option if you do not need extra unadvertised namespaces). That should stop the log spam immediately.
If you can paste the 'namespace' => … snippet (redact host/credentials), that would confirm the diagnosis.
Fix
We are hardening getNamespaces() in horde/imap_client so non-scalar / non-Stringable $additional entries are skipped instead of being passed to strval(), and correcting a related bug that compared namespace name lengths (strlen) instead of names when filtering already-detected namespaces.
Activity
TDannhauer commentedon Jul 20, 2026
Thanks for the report.
Cause
The warning is raised in
Horde_Imap_Client_Base::getNamespaces()(horde/imap_client), not in IMP itself:IMP always forwards the backend
namespacesetting frombackends.php/backends.local.phpas that$additionalargument.strval()on a nested array value triggers PHP’s “Array to string conversion” warning (and turns the value into the literal string"Array").That matches “shows up in the log without any noticeable side effects”: the bogus
"Array"name is probed as an unadvertised namespace, does not match anything useful, and is otherwise ignored — but the warning is logged on every call because thestrvalruns before the namespace cache lookup.Documented shape for the IMP backend option is a flat list of UTF-8 strings, e.g.:
A nested / associative form such as
'#shared/' => array('delimiter' => '/')(or any other non-string element) is enough to produce this warning.Workaround
Please check the
'namespace'entry in your IMPbackends.local.phpand reduce it to a flat list of strings as above (or remove the option if you do not need extra unadvertised namespaces). That should stop the log spam immediately.If you can paste the
'namespace' => …snippet (redact host/credentials), that would confirm the diagnosis.Fix
We are hardening
getNamespaces()inhorde/imap_clientso non-scalar / non-Stringable$additionalentries are skipped instead of being passed tostrval(), and correcting a related bug that compared namespace name lengths (strlen) instead of names when filtering already-detected namespaces.TDannhauer commentedon Jul 20, 2026
Upstream fix: horde/Imap_Client#48
TDannhauer commentedon Jul 20, 2026
@powercycle please test horde/Imap_Client#48 before correcting your config
fix(imap_client): avoid array-to-string warning in getNamespaces
powercycle commentedon Jul 21, 2026
@TDannhauer , just as an additional note, my backends is the same as the distribution, I've made no specific changes. I'll test this soon.
powercycle commentedon Jul 22, 2026
@TDannhauer , this definitely resolved it for me.