6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
11/28/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#14580] Gollem Auth thorws warning and pollutes Errorlog - fix available
*
Your Email Address
*
Spam protection
Enter the letters below:
.__..__ .___..__ __. | || \ _/ [__)(__ |__\|__/./__.| \.__)
Comment
> Gollem Auth (gollem/lib/Auth.php ~line 340) throws warnings: "PHP > ERROR: Invalid argument supplied for foreach()" > > Since the causing function _getBackends() is invoked several times, > it pollutes the logfile. > > In the mentioned function, the passwords are retrieved and iterated > via foreach. However, if only a singlr password is returned, PHP > complains that it is no array. > > I propose to insert an cast into array to have a defined type > presented to foreach() to correct the problem. > > > The fixed function should be like this: > > > gollem/lib/Auth.php: > /** > * Return stored backend list. > * > * @return array Backend configuration list. > */ > protected static function _getBackends() > { > global $session; > > if (($backends = $session->get('gollem', 'backends', > $session::TYPE_ARRAY)) && > ($passwords = $session->get('gollem', > 'backends_password', $session::TYPE_ARRAY))) { > foreach ( (array) $passwords as $key => $val) { > $backends[$key]['params']['password'] = $val; > } > } > > return $backends; > } > > > Thanks, > Torben
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers