From 46be564b15dccef70535df842dbd84a60fd4e608 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 12 Apr 2018 09:26:36 -0400 Subject: [PATCH] Now adding E_NOTICE to error reporting for controller then restoring - When Front Debug --- controllers/front.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/controllers/front.php b/controllers/front.php index f066eaf3..92a37a3c 100644 --- a/controllers/front.php +++ b/controllers/front.php @@ -285,7 +285,15 @@ class glmMembersFront extends GlmPluginSupport { if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG) { + + // Save current error reporting level and add E_NOTICE + $oldErrorLogSetting = error_reporting(); + error_reporting($oldErrorLogSetting | E_NOTICE); + + // Report current memory trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE); + + // Setup for reports at end of controller $controllerShortcode = $shortcode; $controllerStartTime = microtime(true); } @@ -675,6 +683,9 @@ class glmMembersFront extends GlmPluginSupport trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE); $controllerTime = round(microtime(true) - $controllerStartTime, 6); trigger_error($controllerTime." seconds - Shortcode: $controllerShortcode, Model class: $className ---", E_USER_NOTICE); + + // restore error reporting levels + error_reporting($oldErrorLogSetting); } return $out; -- 2.17.1