$filename = '/usr/home/kenorb/websites/doc/trunk/src/sites/all/modules/contrib/crumbs/crumbs.decorateItem.inc', $line = 24
  10.5768  107382936                       -> _crumbs_InvokeAction_decorateItem->invoke($object = class path_class_CrumbsParentFinder {  }, $object_key = 'path', $subkey = NULL) /usr/home/kenorb/websites/doc/trunk/src/sites/all/modules/contrib/crumbs/crumbs.PluginEngine.inc:37
    if (!$this->_objects_prepared[$object_key]) {

Should use: http://php.net/array_key_exists

Comments

kenorb’s picture

   10.5771  107386472                         -> _drupal_error_handler($error_level = 8, $message = 'Undefined index:  path', $filename = '/usr/home/kenorb/websites/doc/trunk/src/sites/all/modules/contrib/crumbs/crumbs.decorateItem.inc', $line = 24, $context = array ('object' => class path_class_CrumbsParentFinder {  }, 'object_key' => 'path', 'subkey' => NULL)) /usr/home/kenorb/websites/doc/trunk/src/includes/common.inc:0
   10.5772  107387656                           -> error_reporting() /usr/home/kenorb/websites/doc/trunk/src/includes/common.inc:3818
donquixote’s picture

I think I only want to get TRUE if the thing is an object. I think it usually is an object, but sometimes it might be NULL, so isset() would be a better choice than array_key_exists.

How comes you suddenly have all those errors popping up? Did you change your php configuration? Or did you move the stuff to a different server?

kenorb’s picture

Those warnings are based on my reading and analyzing XDebug trace files to solve my other issues. Doesn't appear on the screen.
Those are only information bugs, to let you know, that this could be improved.
Each call of _drupal_error_handler slowing down the performance, which are theme, watchdog and other not necessary calls.

See this chart:
http://drupal.org/files/issues/MC-100-nodes.jpg
In heavy configurations 76k calls of drupal_error_handler() could slow the website by almost 1sec.
You never know when crumbs function are called, it's better to keep the code clean as much as possible:)

donquixote’s picture

I wonder if this still occurs in the 2.x branch ..

donquixote’s picture

Status: Active » Needs review

"needs review" = "probably fixed in 2.x"

donquixote’s picture

Status: Needs review » Fixed
donquixote’s picture

Status: Fixed » Closed (fixed)