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