The following code generates a notice if $a['region'] or $b['region'] is not set, in my set-up image_attach is the culprit:

// Sort by region (in the order defined by theme .info file).
var_dump($a);
$place = $regions[$a['region']] - $regions[$b['region']];
if ($place) {
return $place;
}

----------------------------------------------------------------------

A vardump of $a gives this output:

array
'bid' => string '12' (length=2)
'module' => string 'image_attach' (length=12)
'delta' => string '0' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '1' (length=1)
'weight' => string '0' (length=1)
'region' => string '' (length=0)
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '1' (length=1)
'pages' => string 'node/*' (length=6)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Attached Images' (length=15)
array
'bid' => string '2' (length=1)
'module' => string 'user' (length=4)
'delta' => string '1' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '1' (length=1)
'weight' => string '-9' (length=2)
'region' => string 'right' (length=5)
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Navigation' (length=10)
array
'bid' => string '8' (length=1)
'module' => string 'menu' (length=4)
'delta' => string 'secondary-links' (length=15)
'theme' => string 'garland' (length=7)
'status' => string '1' (length=1)
'weight' => string '-10' (length=3)
'region' => string 'left' (length=4)
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '-1' (length=2)
'info' => string 'Secondary links' (length=15)
array
'bid' => string '12' (length=2)
'module' => string 'image_attach' (length=12)
'delta' => string '0' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '1' (length=1)
'weight' => string '0' (length=1)
'region' => string '' (length=0)
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '1' (length=1)
'pages' => string 'node/*' (length=6)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Attached Images' (length=15)
array
'bid' => string '2' (length=1)
'module' => string 'user' (length=4)
'delta' => string '1' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '1' (length=1)
'weight' => string '-9' (length=2)
'region' => string 'right' (length=5)
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Navigation' (length=10)
array
'bid' => string '6' (length=1)
'module' => string 'book' (length=4)
'delta' => string '0' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '1' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '5' (length=1)
'info' => string 'Book navigation' (length=15)
array
'bid' => string '14' (length=2)
'module' => string 'image' (length=5)
'delta' => string '1' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '6' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Random image' (length=12)
array
'bid' => string '13' (length=2)
'module' => string 'image' (length=5)
'delta' => string '0' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '2' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Latest image' (length=12)
array
'bid' => string '5' (length=1)
'module' => string 'aggregator' (length=10)
'delta' => string 'feed-1' (length=6)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '5' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'REDDIT feed latest items' (length=24)
array
'bid' => string '11' (length=2)
'module' => string 'user' (length=4)
'delta' => string '3' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '10' (length=2)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '-1' (length=2)
'info' => string 'Who's online' (length=12)
array
'bid' => string '10' (length=2)
'module' => string 'user' (length=4)
'delta' => string '2' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '9' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Who's new' (length=9)
array
'bid' => string '7' (length=1)
'module' => string 'menu' (length=4)
'delta' => string 'primary-links' (length=13)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '4' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '-1' (length=2)
'info' => string 'Primary links' (length=13)
array
'bid' => string '1' (length=1)
'module' => string 'user' (length=4)
'delta' => string '0' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '-10' (length=3)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'User login' (length=10)
array
'bid' => string '4' (length=1)
'module' => string 'aggregator' (length=10)
'delta' => string 'category-1' (length=10)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '3' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'News category latest items' (length=27)
array
'bid' => string '10' (length=2)
'module' => string 'user' (length=4)
'delta' => string '2' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '9' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Who's new' (length=9)
array
'bid' => string '10' (length=2)
'module' => string 'user' (length=4)
'delta' => string '2' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '9' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Who's new' (length=9)
array
'bid' => string '10' (length=2)
'module' => string 'user' (length=4)
'delta' => string '2' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '9' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Who's new' (length=9)
array
'bid' => string '10' (length=2)
'module' => string 'user' (length=4)
'delta' => string '2' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '9' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Who's new' (length=9)
array
'bid' => string '14' (length=2)
'module' => string 'image' (length=5)
'delta' => string '1' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '6' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Random image' (length=12)
array
'bid' => string '10' (length=2)
'module' => string 'user' (length=4)
'delta' => string '2' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '9' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Who's new' (length=9)
array
'bid' => string '13' (length=2)
'module' => string 'image' (length=5)
'delta' => string '0' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '2' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Latest image' (length=12)
array
'bid' => string '7' (length=1)
'module' => string 'menu' (length=4)
'delta' => string 'primary-links' (length=13)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '4' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '-1' (length=2)
'info' => string 'Primary links' (length=13)
array
'bid' => string '5' (length=1)
'module' => string 'aggregator' (length=10)
'delta' => string 'feed-1' (length=6)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '5' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'REDDIT feed latest items' (length=24)
array
'bid' => string '14' (length=2)
'module' => string 'image' (length=5)
'delta' => string '1' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '6' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Random image' (length=12)
array
'bid' => string '4' (length=1)
'module' => string 'aggregator' (length=10)
'delta' => string 'category-1' (length=10)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '3' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'News category latest items' (length=27)
array
'bid' => string '13' (length=2)
'module' => string 'image' (length=5)
'delta' => string '0' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '2' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Latest image' (length=12)
array
'bid' => string '4' (length=1)
'module' => string 'aggregator' (length=10)
'delta' => string 'category-1' (length=10)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '3' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'News category latest items' (length=27)
array
'bid' => string '14' (length=2)
'module' => string 'image' (length=5)
'delta' => string '1' (length=1)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '6' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'Random image' (length=12)
array
'bid' => string '5' (length=1)
'module' => string 'aggregator' (length=10)
'delta' => string 'feed-1' (length=6)
'theme' => string 'garland' (length=7)
'status' => string '0' (length=1)
'weight' => string '5' (length=1)
'region' => int -1
'custom' => string '0' (length=1)
'throttle' => string '0' (length=1)
'visibility' => string '0' (length=1)
'pages' => string '' (length=0)
'title' => string '' (length=0)
'cache' => string '1' (length=1)
'info' => string 'REDDIT feed latest items' (length=24)

--------------------------------------------------------------------------------------------------

My patch prevents the region check if regions are not set.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stefgosselin’s picture

stefgosselin’s picture

Status: Active » Needs review
FileSize
773 bytes

And, here's the patch ...

Alex UA’s picture

I had this exact same problem, and the attached patch fixed the error. Thanks!!!

webchick’s picture

Version: 6.0-rc2 » 6.x-dev
Status: Needs review » Reviewed & tested by the community

Still an issue in 6.x-dev. Patch works. RTBC.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

Coding style in the patch is far from up to Drupal standards. Usage of tabs, missing whitespace, etc. Also, I'd do if ($place = ...) { return $place; } which looks more short and clean.

webchick’s picture

Status: Needs work » Needs review
FileSize
817 bytes

Wow. I was more tired than I thought last night. :( Really sorry, that was very sloppy.

Let's try this.

webchick’s picture

Title: notice: Undefined index: in /home/versatil/public_html/modules/block/block.admin.inc on line 126. » notice: Undefined index: in modules/block/block.admin.inc on line 126.

fixing title.

bennybobw’s picture

Status: Needs review » Reviewed & tested by the community

Tested and applied on HEAD. RTBC.

Gábor Hojtsy’s picture

Version: 6.x-dev » 7.x-dev
FileSize
743 bytes

I committed the attached incarnation of the patch (which avoids nested single ifs). This also RTBC for 7.x

cburschka’s picture

This patch still applies.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks all.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.