<? class User { private $uid; private $fields; public function __construct($sql) { $this->sql = $sql; $this->uid = null; 'password' => '', 'emailAddr' => '', 'isActive' => false); } public function __get($field) { if($field == 'userId') { return $this->uid; } else { return $this->fields[$field]; } } public function __set($field, $value) { { $this->fields[$field] = $value; } } //dalej
dostaje taki błąd
Kod
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in J:\Serv\www\1B\libs\user.class.php on line 33
Co jest nie tak?
Pozdrawiam