1
다음 코드가 있습니다. 엄격한 표준 : 빈 값에서 기본 객체 만들기
가 어떻게 그 고칠 수 :Strict standards: Creating default object from empty value
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;
}
}
그 라인 5는 다음과 같은 오류를 생산하고 있습니다 나타 납니까?
감사
가능한 복제본 [PHP Strict 표준 : 빈 값에서 기본 객체 만들기 - 수정 방법?] (http://stackoverflow.com/questions/1949966/php-strict-standards-creating-default-object-from- empty-value-to-fix) –