|
@@ 1962-1973 (lines=12) @@
|
| 1959 |
|
// When reached here, no fatal error occured so the lock should be removed. |
| 1960 |
|
/*if(is_file($lock_file_path)) unlink($lock_file_path);*/ |
| 1961 |
|
|
| 1962 |
|
if ((0 < $this->config['error_reporting']) && $msg && isset($php_errormsg)) { |
| 1963 |
|
$error_info = error_get_last(); |
| 1964 |
|
if ($this->detectError($error_info['type'])) { |
| 1965 |
|
$msg = ($msg === false) ? 'ob_get_contents() error' : $msg; |
| 1966 |
|
$this->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], 'Plugin', |
| 1967 |
|
$error_info['message'], $error_info['line'], $msg); |
| 1968 |
|
if ($this->isBackend()) { |
| 1969 |
|
$this->event->alert('An error occurred while loading. Please see the event log for more information.<p>' . $msg . '</p>'); |
| 1970 |
|
} |
| 1971 |
|
} |
| 1972 |
|
} else { |
| 1973 |
|
echo $msg; |
| 1974 |
|
} |
| 1975 |
|
unset($modx->event->params); |
| 1976 |
|
} |
|
@@ 2009-2018 (lines=10) @@
|
| 2006 |
|
} |
| 2007 |
|
$echo = ob_get_contents(); |
| 2008 |
|
ob_end_clean(); |
| 2009 |
|
if ((0 < $this->config['error_reporting']) && isset($php_errormsg)) { |
| 2010 |
|
$error_info = error_get_last(); |
| 2011 |
|
if ($this->detectError($error_info['type'])) { |
| 2012 |
|
$echo = ($echo === false) ? 'ob_get_contents() error' : $echo; |
| 2013 |
|
$this->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], 'Snippet', |
| 2014 |
|
$error_info['message'], $error_info['line'], $echo); |
| 2015 |
|
if ($this->isBackend()) { |
| 2016 |
|
$this->event->alert('An error occurred while loading. Please see the event log for more information<p>' . $echo . $return . '</p>'); |
| 2017 |
|
} |
| 2018 |
|
} |
| 2019 |
|
} |
| 2020 |
|
unset($modx->event->params); |
| 2021 |
|
if (is_array($return) || is_object($return)) { |