I get the following error when adding a new item to the main Admin Menu with my module:
"Notice: Undefined index: LeftAndMain in /var/www/silverstripe/sapphire/core/Object.php on line 241"
This patch fixes the error by only merging the array of extraStatics[$class] if it is not empty: http://www.elijahlofgren.com/silverstripe/patches/Fix-errors-with-Object-addStaticVars-silverstripe.2.0.DailyBuild.2007-05-15.patch
Note: I'm not really sure what's going on here, except that this fixes the error without breaking things (that I know of), so you should double-check to make sure this patch makes sense. ;)
Here is the code I used for my new 'listings' module with this in listings/_config.php
<?php
global $project;
$project = 'listings';
Object::addStaticVars('LeftAndMain', array(
'extra_menu_items' => array(
'MyCustomInterface' => 'admin/listings/',
)
));
Director::addRules(100, array(
'admin/listings/$Action/$ID/$OtherID' => 'Listings',
));
Hope this helps,
Elijah