@@ 2154-2165 (lines=12) @@ | ||
2151 | // When reached here, no fatal error occured so the lock should be removed. |
|
2152 | /*if(is_file($lock_file_path)) unlink($lock_file_path);*/ |
|
2153 | ||
2154 | if ((0 < $this->config['error_reporting']) && $msg && isset($php_errormsg)) { |
|
2155 | $error_info = error_get_last(); |
|
2156 | if ($this->detectError($error_info['type'])) { |
|
2157 | $msg = ($msg === false) ? 'ob_get_contents() error' : $msg; |
|
2158 | $this->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], 'Plugin', $error_info['message'], $error_info['line'], $msg); |
|
2159 | if ($this->isBackend()) { |
|
2160 | $this->event->alert('An error occurred while loading. Please see the event log for more information.<p>' . $msg . '</p>'); |
|
2161 | } |
|
2162 | } |
|
2163 | } else { |
|
2164 | echo $msg; |
|
2165 | } |
|
2166 | unset($modx->event->params); |
|
2167 | } |
|
2168 | ||
@@ 2203-2212 (lines=10) @@ | ||
2200 | } |
|
2201 | $echo = ob_get_contents(); |
|
2202 | ob_end_clean(); |
|
2203 | if ((0 < $this->config['error_reporting']) && isset($php_errormsg)) { |
|
2204 | $error_info = error_get_last(); |
|
2205 | if ($this->detectError($error_info['type'])) { |
|
2206 | $echo = ($echo === false) ? 'ob_get_contents() error' : $echo; |
|
2207 | $this->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], 'Snippet', $error_info['message'], $error_info['line'], $echo); |
|
2208 | if ($this->isBackend()) { |
|
2209 | $this->event->alert('An error occurred while loading. Please see the event log for more information<p>' . $echo . $return . '</p>'); |
|
2210 | } |
|
2211 | } |
|
2212 | } |
|
2213 | unset($modx->event->params); |
|
2214 | if (is_array($return) || is_object($return)) { |
|
2215 | return $return; |