Code Duplication    Length = 10-12 lines in 2 locations

manager/includes/src/Core.php 2 locations

@@ 1909-1920 (lines=12) @@
1906
        // When reached here, no fatal error occured so the lock should be removed.
1907
        /*if(is_file($lock_file_path)) unlink($lock_file_path);*/
1908
1909
        if ((0 < $this->config['error_reporting']) && $msg && isset($php_errormsg)) {
1910
            $error_info = error_get_last();
1911
            if ($this->detectError($error_info['type'])) {
1912
                $msg = ($msg === false) ? 'ob_get_contents() error' : $msg;
1913
                $this->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], 'Plugin', $error_info['message'], $error_info['line'], $msg);
1914
                if ($this->isBackend()) {
1915
                    $this->event->alert('An error occurred while loading. Please see the event log for more information.<p>' . $msg . '</p>');
1916
                }
1917
            }
1918
        } else {
1919
            echo $msg;
1920
        }
1921
        unset($modx->event->params);
1922
    }
1923
@@ 1955-1964 (lines=10) @@
1952
        }
1953
        $echo = ob_get_contents();
1954
        ob_end_clean();
1955
        if ((0 < $this->config['error_reporting']) && isset($php_errormsg)) {
1956
            $error_info = error_get_last();
1957
            if ($this->detectError($error_info['type'])) {
1958
                $echo = ($echo === false) ? 'ob_get_contents() error' : $echo;
1959
                $this->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], 'Snippet', $error_info['message'], $error_info['line'], $echo);
1960
                if ($this->isBackend()) {
1961
                    $this->event->alert('An error occurred while loading. Please see the event log for more information<p>' . $echo . $return . '</p>');
1962
                }
1963
            }
1964
        }
1965
        unset($modx->event->params);
1966
        if (is_array($return) || is_object($return)) {
1967
            return $return;