Summary | Invalid argument supplied for foreach() (gollem/lib/Auth.php) |
Queue | Gollem |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | horde.wayne (at) ptaff (dot) ca |
Created | 11/26/2016 (3138 days ago) |
Due | |
Updated | 10/20/2017 (2810 days ago) |
Assigned | 01/13/2017 (3090 days ago) |
Resolved | 02/01/2017 (3071 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
commit 18fc040ad5312348d34fb99d4611c416f7eb3a65
Author: Jan Schneider <jan@horde.org>
Date: Fri, 13 Jan 2017 22:04:07 +0100
Try to get rid of "Invalid argument supplied for foreach()" from Gollem.
For one, we have been using an invalid flag for $session->get(). Make
sure it returns an array.
Besides that, store the passwords array in the session, even if empty.
Bug: 14523M lib/Auth.php
https://github.com/horde/gollem/commit/18fc040ad5312348d34fb99d4611c416f7eb3a65
commit 726eb303b5fa088eceb29edd72c3647fb85d1b1d
Author: Jan Schneider <jan@horde.org>
Date: Fri Jan 13 21:59:16 2017 +0100
Try to get rid of "Invalid argument supplied for foreach()" from Gollem.
For one, we have been using an invalid flag for $session->get().
Make sure it returns an array.
Besides that, store the passwords array in the session, even if empty.
Bug: 14523gollem/lib/Auth.php | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
http://github.com/horde/horde/commit/726eb303b5fa088eceb29edd72c3647fb85d1b1d
Assigned to Jan Schneider
State ⇒ Feedback
commit 35ddcfa640500a3af72d72ffc78741415d7e7498
Author: Jan Schneider <jan@horde.org>
Date: Fri Jan 13 21:59:16 2017 +0100
Try to get rid of "Invalid argument supplied for foreach()" from Gollem.
For one, we have been using an invalid flag for $session->get().
Make sure it returns an array.
Besides that, store the passwords array in the session, even if empty.
Bug: 14523gollem/lib/Auth.php | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
http://github.com/horde/horde/commit/35ddcfa640500a3af72d72ffc78741415d7e7498
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Invalid argument supplied for foreach() (gollem/lib/Auth.php)
Queue ⇒ Gollem
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
installation.
[gollem] PHP ERROR: Invalid argument supplied for foreach() [pid 8891
on line 338 of "?/gollem/lib/Auth.php"]
Tracing the behaviour, it appears the following code line 336:
$passwords = $session->get('gollem', 'backends_password',
$session::ENCRYPT);
does not always assign an array, sometimes it assigns a binary string
(related to the json_encode() behavior described in
bug #14522perhaps?):
I'd hence suggest, if this binary string behavior is to be expected,
to change line 337 from:
if ($passwords) {
to:
if (is_array($passwords)) {
so that this syslog message is silenced.
Thanks!