hi
I just updated my php to 5.3.8 and now I have some problems.
My ModelAdmin dont work any more. I manage some models with this URL /admin/MyAdmin ....
I'm in dev mode:
[Notice] Trying to get property of non-object
GET /admin/MyAdmin/
Line 114 in /var/www/domain.com/sapphire/forms/CheckboxSetField.php
Source
105 $options = '';
106
107 if ($source == null) {
108 $source = array();
109 $options = "<li>No options available</li>";
110 }
111
112 if($source) foreach($source as $index => $item) {
113 if(is_a($item, 'DataObject')) {
114 $key = $item->ID;
115 $value = $item->Title;
116 } else {
117 $key = $index;
118 $value = $item;
119 }
120
Trace
CheckboxSetField->Field()
Line 369 of ViewableData.php
ViewableData->obj(Field,,,)
Line 446 of ViewableData.php
ViewableData->XML_val(Field)
Line 409 of FormField.php
FormField->FieldHolder()
Line 93 of CompositeField.php
CompositeField->FieldHolder()
Line 93 of CompositeField.php
CompositeField->FieldHolder()
Line 369 of ViewableData.php
ViewableData->obj(FieldHolder,,,1)
Line 446 of ViewableData.php
ViewableData->XML_val(FieldHolder,,1)
Line 78 of .cache.sapphire.templates.Includes.Form.ss
include(/tmp/silverstripe-cache-var-www-domain.com/.cache.sapphire.templates.Includes.Form.ss)
Line 420 of SSViewer.php
SSViewer->process(Form)
Line 342 of ViewableData.php
ViewableData->renderWith(Array)
Line 1108 of Form.php
Form->forTemplate()
Line 447 of ViewableData.php
ViewableData->XML_val(SearchForm,,1)
Line 31 of .cache.cms.templates.ModelSidebar.ss
include(/tmp/silverstripe-cache-var-www-domain.com/.cache.cms.templates.ModelSidebar.ss)
Line 420 of SSViewer.php
SSViewer->process(ModelAdmin_CollectionController)
Line 342 of ViewableData.php
ViewableData->renderWith(ModelSidebar)
Line 387 of ModelAdmin.php
ModelAdmin_CollectionController->getModelSidebar()
Line 258 of ModelAdmin.php
ModelAdmin->getModelForms()
Line 112 of ViewableData.php
ViewableData->__get(ModelForms)
Line 371 of ViewableData.php
ViewableData->obj(ModelForms)
Line 78 of .cache.cms.templates.Includes.ModelAdmin_left.ss
include(/tmp/silverstripe-cache-var-www-domain.com/.cache.cms.templates.Includes.ModelAdmin_left.ss)
Line 420 of SSViewer.php
SSViewer->process(AffiliateAdmin)
Line 342 of ViewableData.php
ViewableData->renderWith(Array)
Line 488 of LeftAndMain.php
LeftAndMain->Left()
Line 369 of ViewableData.php
ViewableData->obj(Left,,,1)
Line 446 of ViewableData.php
ViewableData->XML_val(Left,,1)
Line 59 of .cache.cms.templates.LeftAndMain.ss
include(/tmp/silverstripe-cache-var-www-domain.com/.cache.cms.templates.LeftAndMain.ss)
Line 420 of SSViewer.php
SSViewer->process(AffiliateAdmin)
Line 202 of Controller.php
Controller->handleAction(SS_HTTPRequest)
Line 143 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
Controller->handleRequest(SS_HTTPRequest)
Line 282 of Director.php
Director::handleRequest(SS_HTTPRequest,Session)
Line 125 of Director.php
Director::direct(/admin/MyAdmin/)
Line 127 of main.php
Before the update there was no problem ...
1) This Notice comes even if I dont use a CheckboxSetField in the managed models (ModelAdmin uses it ...)
2) If I deactivate DEV mode, the page /admin/MyAdmin loads normaly ... but why the notice?
???
EDIT:
http://www.php.net/ChangeLog-5.php#5.3.8
There are some items where it's about "is_a" ...
also interesting:
http://roojs.com/index.php/View/242/.html
http://www.serverphorums.com/read.php?7,366375
and about 5.3.8
http://fossplanet.com/f13/%5Bfedora-php-devel-list%5D-is_a-behavior-5-3-8-a-189399/