6.0.0-beta1
8/7/25

[#1912] Undefined index in Horde/Block/Layout.php
Summary Undefined index in Horde/Block/Layout.php
Queue Horde Base
Queue Version 3.0.4
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester selsky (at) columbia (dot) edu
Created 05/05/2005 (7399 days ago)
Due
Updated 05/25/2005 (7379 days ago)
Assigned 05/25/2005 (7379 days ago)
Resolved 05/25/2005 (7379 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/25/2005 02:08:14 PM Jan Schneider Comment #9
State ⇒ Resolved
Reply to this comment
Fixed.
05/25/2005 01:51:19 PM Jan Schneider State ⇒ Assigned
 
05/12/2005 12:18:25 AM Chuck Hagenbuch Comment #8 Reply to this comment
I can reproduce this, but only if I move a block in the bottom (3rd at 
the time) row up back to one of the 2nd row positions right after 
moving the last one down. Otherwise the empty row will have been 
removed already.



Looks like when you're moving a block into a row that would be 
removed, there are problems. I'm not sure exactly where the empty rows 
get removed, though.
05/09/2005 04:30:34 PM Matt Selsky Comment #7 Reply to this comment
I'm running the latest code from HEAD.



It's not specific to weather.com.  If I have a layout like this:



Block | Block

Block | Block



and then I move the second row down to I have a layout like this:



Block | Block

blank | blank

Block | Block



When I go to move one of the lower Block elements back up to the 
second row, I get the undefined index errors.
05/09/2005 08:08:42 AM Jan Schneider Comment #6
State ⇒ Feedback
Reply to this comment
I can't reproduce this. Besides that your example doesn't have a 
weather.com block, the portal behaves as expected with Horde from CVS 
HEAD.

The empty row is purged as soon as I enter the layout page (though not 
saved after that, I'm gonna change this), and I can move the blocks 
around without an error message.
05/09/2005 08:02:23 AM Jan Schneider Assigned to Jan Schneider
State ⇒ Assigned
 
05/07/2005 09:10:40 PM Matt Selsky Comment #5 Reply to this comment
$prefs->getValue('portal_layout'):



a:3:{i:0;a:2:{i:0;a:4:{s:3:"app";s:3:"imp";s:6:"height";i:1;s:5:"width";i:1;s:6:"params";a:2:{s:4:"type";s:7:"summary";s:6:"params";a:2:{s:11:"show_unread";s:2:"on";s:10:"show_total";s:2:"on";}}}i:1;a:4:{s:3:"app";s:5:"klutz";s:6:"height";i:1;s:5:"width";i:1;s:6:"params";a:2:{s:4:"type";s:7:"summary";s:6:"params";a:0:{}}}}i:1;a:2:{i:0;s:5:"empty";i:1;s:5:"empty";}i:2;a:2:{i:0;a:4:{s:3:"app";s:5:"horde";s:6:"height";i:1;s:5:"width";i:1;s:6:"params";a:2:{s:4:"type";s:6:"google";s:6:"params";a:2:{s:6:"offend";s:0:"";s:7:"fortune";a:1:{i:0;s:0:"";}}}}i:1;a:4:{s:3:"app";s:5:"horde";s:6:"height";i:1;s:5:"width";i:1;s:6:"params";a:2:{s:4:"type";s:7:"sunrise";s:6:"params";a:1:{s:8:"location";s:13:"51.517:-0.117";}}}}}



var_dump(unserialize($prefs->getValue('portal_layout'))):



array(3) {

   [0]=>

   array(2) {

     [0]=>

     array(4) {

       ["app"]=>

       string(3) "imp"

       ["height"]=>

       int(1)

       ["width"]=>

       int(1)

       ["params"]=>

       array(2) {

         ["type"]=>

         string(7) "summary"

         ["params"]=>

         array(2) {

           ["show_unread"]=>

           string(2) "on"

           ["show_total"]=>

           string(2) "on"

         }

       }

     }

     [1]=>

     array(4) {

       ["app"]=>

       string(5) "klutz"

       ["height"]=>

       int(1)

       ["width"]=>

       int(1)

       ["params"]=>

       array(2) {

         ["type"]=>

         string(7) "summary"

         ["params"]=>

         array(0) {

         }

       }

     }

   }

   [1]=>

   array(2) {

     [0]=>

     string(5) "empty"

     [1]=>

     string(5) "empty"

   }

   [2]=>

   array(2) {

     [0]=>

     array(4) {

       ["app"]=>

       string(5) "horde"

       ["height"]=>

       int(1)

       ["width"]=>

       int(1)

       ["params"]=>

       array(2) {

         ["type"]=>

         string(6) "google"

         ["params"]=>

         array(2) {

           ["offend"]=>

           string(0) ""

           ["fortune"]=>

           array(1) {

             [0]=>

             string(0) ""

           }

         }

       }

     }

     [1]=>

     array(4) {

       ["app"]=>

       string(5) "horde"

       ["height"]=>

       int(1)

       ["width"]=>

       int(1)

       ["params"]=>

       array(2) {

         ["type"]=>

         string(7) "sunrise"

         ["params"]=>

         array(1) {

           ["location"]=>

           string(13) "51.517:-0.117"

         }

       }

     }

   }

}


05/07/2005 08:32:47 AM Jan Schneider Comment #4 Reply to this comment
Uh, empty lines shouldn't be possible at all because they got pruned.

Can you post $prefs->getValue('portal_layout') and 
unserialize($prefs->getValue('portal_layout'))?
05/06/2005 10:42:02 PM Matt Selsky Comment #3 Reply to this comment
Still happening with latest CVS:



Notice: Undefined offset: 2 in 
/opt/php-4.3.11/lib/php/Horde/Block/Layout.php on line 489



Notice: Undefined offset: 2 in 
/opt/php-4.3.11/lib/php/Horde/Block/Layout.php on line 510



Notice: Undefined offset: 2 in 
/opt/php-4.3.11/lib/php/Horde/Block/Layout.php on line 489



Notice: Undefined offset: 2 in /opt/php-4.3.11/lib/php/Horde/Array.php 
on line 199



Warning: array_slice(): The first argument should be an array in 
/opt/php-4.3.11/lib/php/Horde/Array.php on line 199



My layout:

Mail Folder: Sumary | Comics

Empty | Empty

Weather.com | Empty



I'm trying to move Weather.com up to the empty block above it.
05/05/2005 12:00:57 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
It is, but first see if this still happens with the latest CVS code. I 
fixed several layout bugs since 3.0.4
05/05/2005 05:14:02 AM Matt Selsky Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Undefined index in Horde/Block/Layout.php
Queue ⇒ Horde Base
State ⇒ Unconfirmed
Reply to this comment
I was moving the weather.com block up one row via the array button and 
I got the following warnings:



Notice: Undefined offset: 2 in 
/etc/httpd/htdocs/horde/lib/Horde/Block/Layout.php on line 479



Notice: Undefined offset: 2 in 
/etc/httpd/htdocs/horde/lib/Horde/Block/Layout.php on line 500



Notice: Undefined offset: 2 in 
/etc/httpd/htdocs/horde/lib/Horde/Block/Layout.php on line 479



Notice: Undefined offset: 2 in 
/etc/httpd/htdocs/horde/lib/Horde/Array.php on line 199



Warning: array_slice(): The first argument should be an array in 
/etc/httpd/htdocs/horde/lib/Horde/Array.php on line 199



Let me know if the exact block layout is important.

Saved Queries