From d22a25c8779757f14e8f8c43ff4dfd24c3e4c1c0 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 13 Jan 2021 17:38:34 -0800 Subject: [PATCH] PHP8 Remove constant conflict. --- e107_handlers/news_class.php | 18 ++++++++++-------- e107_handlers/user_extended_class.php | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/e107_handlers/news_class.php b/e107_handlers/news_class.php index cfa7f9988..42cf3080e 100644 --- a/e107_handlers/news_class.php +++ b/e107_handlers/news_class.php @@ -295,29 +295,31 @@ class news { if (!isset($param['image_nonew_small'])) { - if (!defined("IMAGE_nonew_small")) + /* if (!defined("IMAGE_nonew_small")) { define("IMAGE_nonew_small", (file_exists(THEME."images/nonew_comments.png") ? " " : "")); - } - $param['image_nonew_small'] = IMAGE_nonew_small; + }*/ + $param['image_nonew_small'] = (file_exists(THEME."images/nonew_comments.png") ? " " : ""); } if (!isset($param['image_new_small'])) { - if (!defined("IMAGE_new_small")) + /* if (!defined("IMAGE_new_small")) { define("IMAGE_new_small", (file_exists(THEME."images/new_comments.png") ? " " : " ")); } - $param['image_new_small'] = IMAGE_new_small; + */ + $param['image_new_small'] = (file_exists(THEME."images/new_comments.png") ? " " : " "); + } if (!isset($param['image_sticky'])) { - if (!defined("IMAGE_sticky")) + /* if (!defined("IMAGE_sticky")) { define("IMAGE_sticky", (file_exists(THEME."images/sticky.png") ? " " : " ")); - } - $param['image_sticky'] = IMAGE_sticky; + }*/ + $param['image_sticky'] = (file_exists(THEME."images/sticky.png") ? " " : " "); } e107::setRegistry('current_news_item', $news); diff --git a/e107_handlers/user_extended_class.php b/e107_handlers/user_extended_class.php index c5143e85a..a4c6a95b4 100644 --- a/e107_handlers/user_extended_class.php +++ b/e107_handlers/user_extended_class.php @@ -913,6 +913,7 @@ class e107_user_extended // wrong type if(false === $field_info) { + trigger_error('$field_info is false: '.__METHOD__, E_USER_NOTICE); e107::getMessage()->addDebug("\$field_info is false ".__METHOD__); return false; }