Summary | Unexpected return value in /framework/Core/lib/Horde/Core/Tree/Javascript.php |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | |
Requester | wrobel (at) horde (dot) org |
Created | 03/18/2011 (5226 days ago) |
Due | |
Updated | 03/18/2011 (5226 days ago) |
Assigned | |
Resolved | 03/18/2011 (5226 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Bug #9680: Carry the $mask parameter over to the session to actuallyreturn an array.
1 files changed, 2 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/687c7009b13cedec6da34b0b2c0d0a77108a9dc8
State ⇒ Resolved
optional 3rd parameter to Horde_Session#get() to indicate an empty
array should be returned if the session value is not found.
Bug #9680: Make sure value returned is an array1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/9ecddfe2a89417fc9eab7ceb8c7ab9083e54b293
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Unexpected return value in /framework/Core/lib/Horde/Core/Tree/Javascript.php
Type ⇒ Bug
State ⇒ Unconfirmed
HORDE [horde] PHP ERROR: array_keys() [<a
href='function.array-keys'>function.array-keys</a>]: The first
argument should be an
array [pid 10039 on line 50 of
"/framework/Core/lib/Horde/Core/Tree/Javascript.php"]
Mar 18 17:31:49 temple HORDE:
1. Horde::menu() /horde/services/portal/index.php:56
#0122. require() /framework/Core/lib/Horde.php:2164#0123. require() /horde/templates/menu/menu.inc:4#0124. Horde_Core_Sidebar->getTree() /horde/services/sidebar.php:27#0125. Horde_Core_Factory_Tree->create()/framework/Core/lib/Horde/Core/Sidebar.php:127
#0126. Horde_Tree::factory()/framework/Core/lib/Horde/Core/Factory/Tree.php:79
#0127. Horde_Core_Tree_Javascript->__construct()/framework/Tree/lib/Horde/Tree.php:53
#0128. array_keys() /framework/Core/lib/Horde/Core/Tree/Javascript.php:50#0129. Horde::errorHandler()This fixes the issue for me
diff --git a/framework/Core/lib/Horde/Core/Tree/Javascript.php
b/framework/Core/lib/Horde/Core/Tree/Javascript.php
index b8ebb78..66eaace 100644
--- a/framework/Core/lib/Horde/Core/Tree/Javascript.php
+++ b/framework/Core/lib/Horde/Core/Tree/Javascript.php
@@ -37,6 +37,9 @@ class Horde_Core_Tree_Javascript extends
Horde_Core_Tree_Html
isset($_COOKIE[$this->_instance . '_expanded'])) {
/* Get current session expanded values. */
$curr = call_user_func($session['get'], $this->_instance, '');
+ if (empty($curr)) {
+ $curr = array();
+ }
/* Remove "exp" prefix from cookie value. */
$exp = explode(',', substr($_COOKIE[$this->_instance .
'_expanded'], 3));
... but I do not assume this is the correct fix.