bgarrels / textpattern

Automatically exported from code.google.com/p/textpattern
0 stars 0 forks source link

pluginErrorHandler outputs gTxt('plugin_load_error') while in Live mode #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Have your production status on 'Live'. 
2. Have a loaded plugin generate a PHP error or notice 

What is the expected output? 

I would expect no message being displayed about any PHP error whatsoever when 
production status is set to 'Live'.
The function pluginErrorHandler() in txplib_misc.php outputs backtracing info 
only when $production_status == 'debug', and I would expect the 

What do you see instead?

The string gTxt('plugin_load_error') will be displayed.
 English example:
"A problem occured while loading the plugin: [plugin_name] -> : Assigning the 
return value of new by reference is deprecated on line 1241

What version of the product are you using? On what operating system?
Textpattern 4.20 on Apache/Linux

Please provide any additional information below.

My suggested fix: enclose not only the backtracing info, but also this gTxt 
message in the scope of the production-status-condition, like this: 

if ($production_status == 'debug') {
  printf ("<pre>".gTxt('plugin_load_error').' <b>%s</b> -> <b>%s: %s on line %s</b></pre>',
      $txp_current_plugin, $error[$errno], $errstr, $errline);
  print "\n<pre style=\"padding-left: 2em;\" class=\"backtrace\"><code>".htmlspecialchars(join("\n", get_caller(10)))."</code></pre>";
}

Original issue reported on code.google.com by haker...@gmail.com on 19 Jun 2010 at 9:24

GoogleCodeExporter commented 9 years ago
Excuse me for the lack of boldface :-)

Original comment by haker...@gmail.com on 19 Jun 2010 at 9:26

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r3365.

Original comment by r.wetzlmayr on 21 Jun 2010 at 5:43

GoogleCodeExporter commented 9 years ago

Original comment by r.wetzlmayr on 21 Jun 2010 at 5:44