[Tickets #13548] fatal error if in backend 'preferred' is an array
noreply at bugs.horde.org
noreply at bugs.horde.org
Sat Sep 6 18:27:37 UTC 2014
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: https://bugs.horde.org/ticket/13548
------------------------------------------------------------------------------
Ticket | 13548
Created By | weis at kip.uni-heidelberg.de
Summary | fatal error if in backend 'preferred' is an array
Queue | Ingo
Version | 3.2.1
Type | Bug
State | Unconfirmed
Priority | 1. Low
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
weis at kip.uni-heidelberg.de (2014-09-06 18:27) wrote:
After upgrade to the newest version, ingo (and imp) crashed with a fatal error
No "script" element found in backend configuration.
In the backend definition of ingo 'script' was defined.
The error traced back to
_getBackend() ....ingo/lib/Session.php:47
where I found the reason:
In file ingo/lib/Session.php (line 126):
foreach ($val['preferred'] as $val) {
if (($val == $_SERVER['SERVER_NAME']) ||
($val == $_SERVER['HTTP_HOST'])) {
$backend = $val;
}
}
This code is only used, if 'preferred' in the backend definition is an array.
$val is used in two meanings and the 'foreach' overwrites the first one.
It should be more like this:
foreach ($val['preferred'] as $v) {
if (($v == $_SERVER['SERVER_NAME']) ||
($v == $_SERVER['HTTP_HOST'])) {
$backend = $v;
}
}
sorry, don't know how make a patch for this
More information about the bugs
mailing list