This commit is contained in:
parent
8508f42216
commit
6aed7dd976
@ -169,10 +169,7 @@ class Model {
|
|||||||
if (isset($data[$key]))
|
if (isset($data[$key]))
|
||||||
$value = $data[$key];
|
$value = $data[$key];
|
||||||
else
|
else
|
||||||
{
|
|
||||||
var_dump($key.' not set');
|
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
|
||||||
|
|
||||||
if (is_array($value))
|
if (is_array($value))
|
||||||
continue;
|
continue;
|
||||||
@ -200,7 +197,7 @@ class Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($required && strlen($value) == 0) {
|
if ($required && strlen($value) == 0) {
|
||||||
throw new Exception($this->dbTable . "." . $key . " is required");
|
throw new Exception($this->dbTable . "." . $key . " is required but is set to '$value'");
|
||||||
}
|
}
|
||||||
if ($value == null)
|
if ($value == null)
|
||||||
continue;
|
continue;
|
||||||
|
@ -34,8 +34,8 @@ class User extends Model {
|
|||||||
|
|
||||||
$_SESSION['user']->save();
|
$_SESSION['user']->save();
|
||||||
|
|
||||||
var_dump($_SESSION['user']);
|
//var_dump($_SESSION['user']);
|
||||||
exit();
|
//exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function logout()
|
function logout()
|
||||||
|
Reference in New Issue
Block a user