@@ -1380,24 +1380,26 @@ private function processError($paramMethodName, $paramErrorMessage)
13801380 {
13811381 if (StaticValidator::inWP_Debug ())
13821382 {
1383+ // Load errors only in local or global debug mode
1384+
13831385 // NOTE: add_action('admin_notices', ...); doesn't always work - maybe due to fact, that 'admin_notices'
13841386 // has to be registered not later than X point in code. So we use '_doing_it_wrong' instead
13851387 // Works
13861388 if (!is_null ($ this ->confWithoutRouting ))
13871389 {
1388- $ validErrorMessage = '<div class=" ' .$ this ->confWithoutRouting ->getPluginCSS_Prefix ().'error"><div id="message" class="error"><p> ' .esc_html ($ paramMethodName ).'</p></div></div> ' ;
1390+ $ errorMessageHTML = '<div class=" ' .$ this ->confWithoutRouting ->getPluginCSS_Prefix ().'error"><div id="message" class="error"><p> ' .esc_html ($ paramMethodName ).'</p></div></div> ' ;
13891391
1390- // Based on WP Coding Standards ticket #341 , the WordPress '_doing_it_wrong' method does not escapes the HTML by default,
1391- // so this has to be done by us. Read more: https://github.com/WordPress/WordPress-Coding-Standards/pull/341
1392- _doing_it_wrong (esc_html ($ paramMethodName ), esc_br_html ( $ validErrorMessage ) , $ this ->confWithoutRouting ->getPluginSemver ());
1392+ // Based on WP Coding Standards ticket #340 , the WordPress '_doing_it_wrong' method does not escapes the HTML by default,
1393+ // so this has to be done by us. Read more: https://github.com/WordPress/WordPress-Coding-Standards/pull/340
1394+ _doing_it_wrong (esc_html ($ paramMethodName ), $ errorMessageHTML , $ this ->confWithoutRouting ->getPluginSemver ());
13931395 } else
13941396 {
13951397 // $confWithoutRouting is NULL
1396- $ validErrorMessage = '<div id="message" class="error"><p> ' .esc_br_html ($ paramErrorMessage ).'</p></div> ' ;
1398+ $ errorMessageHTML = '<div id="message" class="error"><p> ' .esc_br_html ($ paramErrorMessage ).'</p></div> ' ;
13971399
1398- // Based on WP Coding Standards ticket #341 , the WordPress '_doing_it_wrong' method does not escapes the HTML by default,
1399- // so this has to be done by us. Read more: https://github.com/WordPress/WordPress-Coding-Standards/pull/341
1400- _doing_it_wrong (esc_html ($ paramMethodName ), esc_br_html ( $ validErrorMessage ) , 0.0 );
1400+ // Based on WP Coding Standards ticket #340 , the WordPress '_doing_it_wrong' method does not escapes the HTML by default,
1401+ // so this has to be done by us. Read more: https://github.com/WordPress/WordPress-Coding-Standards/pull/340
1402+ _doing_it_wrong (esc_html ($ paramMethodName ), $ errorMessageHTML , 0.0 );
14011403 }
14021404 }
14031405 }
0 commit comments