From 59cd8f3859d9282468a99798f56fae55d5c9373b Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 21 Jan 2019 15:31:49 +0100 Subject: [PATCH] fixed error logging(php7), small fixes --- log/error_handler/error_handler_dbwriter.php | 2 +- log/result/JsonResult.php | 2 +- sai/modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl | 4 ++-- security/security.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/log/error_handler/error_handler_dbwriter.php b/log/error_handler/error_handler_dbwriter.php index 687edcc..ae0ad28 100644 --- a/log/error_handler/error_handler_dbwriter.php +++ b/log/error_handler/error_handler_dbwriter.php @@ -49,7 +49,7 @@ class error_handler_dbwriter implements \SYSTEM\LOG\error_handler { * @param int $type Type of the Todo(Exception) * @return bool Returns false */ - public static function todo_exception(\Exception $E, $thrown, $type = \SYSTEM\SQL\system_todo::FIELD_TYPE_EXCEPTION){ + public static function todo_exception($E, $thrown, $type = \SYSTEM\SQL\system_todo::FIELD_TYPE_EXCEPTION){ try{ if(\property_exists(get_class($E), 'todo_logged') && $E->todo_logged){ return false;} //alrdy logged(this prevents proper thrown value for every system exception) diff --git a/log/result/JsonResult.php b/log/result/JsonResult.php index 8d8c727..e9ea960 100644 --- a/log/result/JsonResult.php +++ b/log/result/JsonResult.php @@ -55,7 +55,7 @@ class JsonResult{ * @param \Exception $e Exception to be convered. * @return string Returns json string. */ - public static function error(\Exception $e){ + public static function error($e){ $error = array(); $error['class'] = get_class($e); $error['message'] = $e->getMessage(); diff --git a/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl index 08ce842..6e54ced 100644 --- a/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl +++ b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl @@ -23,8 +23,8 @@ \ No newline at end of file diff --git a/security/security.php b/security/security.php index c35c512..c3b3a07 100644 --- a/security/security.php +++ b/security/security.php @@ -238,7 +238,7 @@ class security { */ public static function confirm_email($post_script=null,$post_script_data=null) { if(!\SYSTEM\SECURITY\security::isLoggedIn()){ - throw new ERROR("You need to be logged in to confirm your EMail!");} + throw new \SYSTEM\SECURITY\ERROR("You need to be logged in to confirm your EMail!");} return self::confirm_email_admin(\SYSTEM\SECURITY\security::getUser()->username, $post_script, $post_script_data); }