Creating default object from empty value

When in the server the error reporting is higher, than normal, it can write out this error message for some code. Usually the message is this:
WordPress Warning: Creating default object from empty value in /wp-content/plugins/nextend-accordion-menu/library/accordionmenu/treebase.php on line 96
Joomla Warning: Creating default object from empty value in /libraries/nextend/accordionmenu/treebase.php on line 102

Solution

Update your Accordion Menu.

Alternative solution

Go to that file, and that line, in these cases the code will look like this:

case 2:
   foreach ($stack AS $s) {
      $this->allItems[$s]->active = true;
   }
   break;

And make that variable, which is using one or more arrow sign equal to new stdClass(); before it is used:

if($this->allItems[$s] == null) $this->allItems[$s] = new stdClass();

Like this:

case 2:
   foreach ($stack AS $s) {
      if($this->allItems[$s] == null) $this->allItems[$s] = new stdClass();
      $this->allItems[$s]->active = true;
   }
   break;