From 6aed7dd97645e75fd078febab7e17de82bd81cff Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 30 Oct 2023 23:33:22 +0100 Subject: [PATCH] test --- web/inc/classes/Model.class.php | 5 +---- web/models/User.model.php | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/web/inc/classes/Model.class.php b/web/inc/classes/Model.class.php index 9024980..f016d5d 100644 --- a/web/inc/classes/Model.class.php +++ b/web/inc/classes/Model.class.php @@ -169,10 +169,7 @@ class Model { if (isset($data[$key])) $value = $data[$key]; else - { - var_dump($key.' not set'); $value = null; - } if (is_array($value)) continue; @@ -200,7 +197,7 @@ class Model { } 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) continue; diff --git a/web/models/User.model.php b/web/models/User.model.php index 6deb32c..0877efe 100644 --- a/web/models/User.model.php +++ b/web/models/User.model.php @@ -34,8 +34,8 @@ class User extends Model { $_SESSION['user']->save(); - var_dump($_SESSION['user']); - exit(); + //var_dump($_SESSION['user']); + //exit(); } function logout()