title: Strict standards: Creating default object from empty value
body: <p>I have the following code.</p>
  
  <pre><code>        public function get_users_theme($uid)
              {
                      $r = $this-&gt;db2-&gt;query('SELECT * FROM users_theme WHERE user_id="'.$uid.'" LIMIT 1', FALSE);
                      if ($this-&gt;db2-&gt;num_rows($r) &gt; 0) {
                              $o-&gt;user_theme = new stdClass();
                              $ut = $this-&gt;db2-&gt;fetch_object($r);
                              foreach($ut as $l=&gt;$s) {
                                      $o-&gt;user_theme-&gt;$l  = stripslashes($s);
              }
                              return $o-&gt;user_theme;
                      } else {
                              return FALSE;
                      }
              }
  </code></pre>
  
  <p>It appears that line 5 are producing the following error:</p>
  
  <blockquote>
    <p>Strict standards: Creating default object from empty value</p>
  </blockquote>
  
  <p>How Can I Fix That ?</p>
  
  <p>Thanks</p>