[#6040] mnemo renders php error if $GLOBALS['display_notepads'] is not defined
Summary mnemo renders php error if $GLOBALS['display_notepads'] is not defined
Queue Mnemo
Queue Version 2.2-RC1
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester m (dot) gabriel (at) das-netzwerkteam (dot) de
Created 12/24/2007 (139 days ago)
Due
Updated 12/25/2007 (138 days ago)
Assigned 12/24/2007 (139 days ago)
Resolved 12/25/2007 (138 days ago)
Attachments
Milestone
Patch

History
12/25/2007 Chuck Hagenbuch State ⇒ Not A Bug
 
12/25/2007 m (dot) gabriel (at) das-netzwerkteam (dot) de Comment #3 Reply to this comment
ohhh... you are right. there was an error in my mnemo config dir. by some reason mnemo had a kronolith prefs.php file.

i guess, then this can be considered as a "rejected ticket".

greets,
mike
12/24/2007 Chuck Hagenbuch Taken from Horde DevelopersHorde Developers
 
12/24/2007 Chuck Hagenbuch Comment #2
State ⇒ Feedback
Assigned to Horde DevelopersHorde Developers
Reply to this comment
$GLOBALS['display_notepads'] would only not be an array if the display_notepads preference was corrupted, or if you didn't have an up to date prefs.php config file. Do you know what the cause was in your case?
12/24/2007 m (dot) gabriel (at) das-netzwerkteam (dot) de Comment #1
Queue ⇒ Mnemo
Summary ⇒ mnemo renders php error if $GLOBALS['display_notepads'] is not defined
Type ⇒ Bug
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Reply to this comment
i am using kolab-2.1 (debian unstable) and horde-webmail-1.1rc1

the patch below silenced this php5 error if $GLOBALS['display_notepads'] is undefined...

Warning: Invalid argument supplied for foreach() in /usr/local/share/_horde-versions_/horde-webmail-1.1-rc1-netzwerkteam/mnemo/lib/Mnemo.php on line 403

diff -r horde-webmail-1.1-rc1/mnemo/lib/Mnemo.php horde-webmail-1.1-rc1-netzwerkteam/mnemo/lib/Mnemo.php
402,406c402,408
<         foreach ($_temp as $id) {
<             if (isset($_all[$id])) {
<                 $GLOBALS['display_notepads'][] = $id;
<             }
<         }
---
>       if ($_temp) {
>           foreach ($_temp as $id) {
>                 if (isset($_all[$id])) {
>                   $GLOBALS['display_notepads'][] = $id;
>               }
>           }
>       }

mike