Title: Warning: Creating default object from empty value
Last modified: August 21, 2016

---

# Warning: Creating default object from empty value

 *  [Myla_Lim](https://wordpress.org/support/users/myla_lim/)
 * (@myla_lim)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-19/)
 * Hi guys, I need help.
    I keep getting this error, Warning: Creating default object
   from empty value in C:\xampp\htdocs\wordpress\wp-content\themes\tastycrunch\header.
   php on line 317
 * what does it means?
    I’m trying to create a nivo slider. It works but this error
   kept on displaying. Thanks for the help!

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

 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-19/#post-3953162)
 * Do you have WP_DEBUG set to true in your wp-config?
    [http://codex.wordpress.org/WP_DEBUG](http://codex.wordpress.org/WP_DEBUG)
   If so set it to false and see if the error goes away.
 * Or ask your host to disable E_STRICT warnings.
    [http://stackoverflow.com/questions/8900701/creating-default-object-from-empty-value-in-php](http://stackoverflow.com/questions/8900701/creating-default-object-from-empty-value-in-php)
 * How are you creating the nivo slider?
 *  Thread Starter [Myla_Lim](https://wordpress.org/support/users/myla_lim/)
 * (@myla_lim)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-19/#post-3953218)
 * this is the code:
 *     ```
       <div class="inner">
         <!-- Home page Slider Starts -->
          <?php
       global $node,$counter_gal;
        $show_slider = "";
        $cs_home_page_slider = get_option("cs_home_page_slider");
         if ($cs_home_page_slider <> "") {
               $xmlObject = new SimpleXMLElement($cs_home_page_slider);
                       $show_slider = $xmlObject->show_slider;
                       $node->slider_type = $xmlObject->slider_type;
                       $node->slider = $xmlObject->slider_id;
                }
                     if ($show_slider == 'on') {
                         $counter_gal = 1;
                          $node->width = 912;
                         $node->height = 374;
                      ?>
                    <div id="banner">
                 <span class="top-left-box"> </span>
             <span class="top-right-box"> </span>
        <span class="bottom-left-box"> </span>
       <span class="bottom-right-box"> </span>
        <?php get_template_part( 'page_slider', 'page' ); ?>
        </div>
       ```
   
 * _[Please post code or markup between backticks or use the code button. Or better
   still – use a [pastebin](http://pastebin.com/). Your posted code may now have
   been permanently damaged/corrupted by the forum’s parser.]_
 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-19/#post-3953226)
 * Where did you get that code from?
 *  [Logorivals](https://wordpress.org/support/users/logorivals/)
 * (@logorivals)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-19/#post-3953406)
 * Hello please help me.
    I got the same error on the homepage. Really need to solve
   this!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-19/#post-3953407)
 * **[@logorivals](https://wordpress.org/support/users/logorivals/)**: If you require
   assistance then, as per the [Forum Welcome](http://codex.wordpress.org/Forum_Welcome#Where_To_Post),
   please post your own topic.
 * This 6 month old topic references an old version of WordPress.

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

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 4 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/warning-creating-default-object-from-empty-value-19/#post-3953407)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
