|
@@ 1886-1897 (lines=12) @@
|
| 1883 |
|
// When reached here, no fatal error occured so the lock should be removed. |
| 1884 |
|
/*if(is_file($lock_file_path)) unlink($lock_file_path);*/ |
| 1885 |
|
|
| 1886 |
|
if ((0 < $this->config['error_reporting']) && $msg && isset($php_errormsg)) { |
| 1887 |
|
$error_info = error_get_last(); |
| 1888 |
|
if ($this->detectError($error_info['type'])) { |
| 1889 |
|
$msg = ($msg === false) ? 'ob_get_contents() error' : $msg; |
| 1890 |
|
$this->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], 'Plugin', $error_info['message'], $error_info['line'], $msg); |
| 1891 |
|
if ($this->isBackend()) { |
| 1892 |
|
$this->event->alert('An error occurred while loading. Please see the event log for more information.<p>' . $msg . '</p>'); |
| 1893 |
|
} |
| 1894 |
|
} |
| 1895 |
|
} else { |
| 1896 |
|
echo $msg; |
| 1897 |
|
} |
| 1898 |
|
unset($modx->event->params); |
| 1899 |
|
} |
| 1900 |
|
|
|
@@ 1932-1941 (lines=10) @@
|
| 1929 |
|
} |
| 1930 |
|
$echo = ob_get_contents(); |
| 1931 |
|
ob_end_clean(); |
| 1932 |
|
if ((0 < $this->config['error_reporting']) && isset($php_errormsg)) { |
| 1933 |
|
$error_info = error_get_last(); |
| 1934 |
|
if ($this->detectError($error_info['type'])) { |
| 1935 |
|
$echo = ($echo === false) ? 'ob_get_contents() error' : $echo; |
| 1936 |
|
$this->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], 'Snippet', $error_info['message'], $error_info['line'], $echo); |
| 1937 |
|
if ($this->isBackend()) { |
| 1938 |
|
$this->event->alert('An error occurred while loading. Please see the event log for more information<p>' . $echo . $return . '</p>'); |
| 1939 |
|
} |
| 1940 |
|
} |
| 1941 |
|
} |
| 1942 |
|
unset($modx->event->params); |
| 1943 |
|
if (is_array($return) || is_object($return)) { |
| 1944 |
|
return $return; |