PluginProbe
CSS & JavaScript Toolbox / 6.0.15
CSS & JavaScript Toolbox v6.0.15
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | framework/php/evaluator/evaluator.inc.php +7 -12 126.0.15 View file →
@@ -48,23 +48,18 @@
48 48 ob_start();
49 49 // Evaluate PHP code and save the result!
50 50 $beforeEvalError = error_get_last();
51 51 $unusedResult = eval("?>{$code}");
52 - $afterEvalError = error_get_last();
53 52 $evalOBuffer = ob_get_clean();
54 - $showError = ini_get('display_errors') && WP_DEBUG;
55 - $isError = $afterEvalError && ($beforeEvalError != $afterEvalError);
56 53 // Handling errors!
57 - if ($isError && $showError) {
58 - $this->output = 'CJT PHP Code Error detected for the following block: <br><br>';
59 - $this->output .= "Name: {$block->name}<br>";
60 - $this->output .= "ID: #{$block->id}<br><br>";
61 - if ($evalOBuffer) {
62 - $this->output .= "PHP Error message:<br>";
54 + if ($beforeEvalError != error_get_last()) {
55 + if (ini_get('display_errors')) {
56 + $this->output = 'CJT PHP Code Error detected for the following block: <br><br>';
57 + $this->output .= "Name: {$block->name}<br>";
58 + $this->output .= "ID: #{$block->id}<br><br>";
59 + $this->output .= "PHP Error Details are listed below:<br>";
63 60 $this->output .= $evalOBuffer;
64 61 }
65 - $this->output .= "PHP Error tech Details:<br>";
66 - $this->output .= print_r($afterEvalError, true);
67 62 }
68 63 else { // Get evaludated code result!
69 64 $this->output .= $evalOBuffer;
70 65 }
@@ -94,5 +89,5 @@
94 89 */
95 90 public function getOutput() {
96 91 return $this->output;
97 92 }
98 -} // End class.
93 +} // End class.