Title: PHP Warning: Creating default object from empty value
Last modified: September 13, 2017

---

# PHP Warning: Creating default object from empty value

 *  Resolved [JohnP](https://wordpress.org/support/users/johnp/)
 * (@johnp)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-warning-creating-default-object-from-empty-value-3/)
 * I’m tracking down bugs, and see I am getting a warning:
 * PHP Warning: Creating default object from empty value
 * Location:
    wp-content/plugins/nextend-accordion-menu/library/accordionmenu/treebase.
   php:108
 * Is this plugin compatible with PHP v7.0?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Gabor](https://wordpress.org/support/users/nextendweb_gabor/)
 * (@nextendweb_gabor)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-warning-creating-default-object-from-empty-value-3/#post-9492519)
 * Hi [@johnp](https://wordpress.org/support/users/johnp/)!
 * Yes, the latest version of our menu is compatible with PHP7 and I think your 
   problem was fixed in the latest version. Do you have that installed on your website?
   The free one’s version is 9.3.4. and the pro one’s is 9.3.9.
 *  Plugin Author [Gabor](https://wordpress.org/support/users/nextendweb_gabor/)
 * (@nextendweb_gabor)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-warning-creating-default-object-from-empty-value-3/#post-9492535)
 * .
    -  This reply was modified 8 years, 8 months ago by [Gabor](https://wordpress.org/support/users/nextendweb_gabor/).
 *  Thread Starter [JohnP](https://wordpress.org/support/users/johnp/)
 * (@johnp)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-warning-creating-default-object-from-empty-value-3/#post-9494308)
 * Yes, I am using version 9.3.4.
 * I found the forum post from a year ago where you fixed a similar warning from
   line 62
    [https://wordpress.org/support/topic/php-warning-fixes-in-9-3-2/](https://wordpress.org/support/topic/php-warning-fixes-in-9-3-2/),
   but this seems to be a different issue.
 *  Plugin Author [Gabor](https://wordpress.org/support/users/nextendweb_gabor/)
 * (@nextendweb_gabor)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-warning-creating-default-object-from-empty-value-3/#post-9495710)
 * If you open up that file:
    wp-content/plugins/nextend-accordion-menu/library/
   accordionmenu/treebase.php
 * and go to the 108th line, do you see a @ sign in the beginning?:
    `@$this->allItems[
   $s]->opened = true;`
 * that should hide this kind of messages. If you do see it, then please try to 
   add this code right in front of it:
    `if(empty($this->allItems[$s])) $this->allItems[
   $s] = new stdClass();`
 * so together it would look like this:
 *     ```
       if(empty($this->allItems[$s])) $this->allItems[$s] = new stdClass();
       @$this->allItems[$s]->opened = true;
       ```
   
 * If this wouldn’t work either, please write to us to [support@nextendweb.com](https://wordpress.org/support/topic/php-warning-creating-default-object-from-empty-value-3/support@nextendweb.com?output_format=md)
   and there we can try to debug this problem further!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP Warning: Creating default object from empty value’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/nextend-accordion-menu_ab9186.svg)
 * [Nextend Accordion Menu](https://wordpress.org/plugins/nextend-accordion-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextend-accordion-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextend-accordion-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/nextend-accordion-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextend-accordion-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextend-accordion-menu/reviews/)

## Tags

 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)

 * 4 replies
 * 2 participants
 * Last reply from: [Gabor](https://wordpress.org/support/users/nextendweb_gabor/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/php-warning-creating-default-object-from-empty-value-3/#post-9495710)
 * Status: resolved