Code Duplication    Length = 11-14 lines in 2 locations

manager/processors/execute_module.processor.php 1 location

@@ 86-99 (lines=14) @@
83
	if (isset($php_errormsg))
84
	{
85
		$error_info = error_get_last();
86
        switch($error_info['type'])
87
        {
88
        	case E_NOTICE :
89
        		$error_level = 1;
90
        	case E_USER_NOTICE :
91
        		break;
92
        	case E_DEPRECATED :
93
        	case E_USER_DEPRECATED :
94
        	case E_STRICT :
95
        		$error_level = 2;
96
        		break;
97
        	default:
98
        		$error_level = 99;
99
        }
100
		if($modx->config['error_reporting']==='99' || 2<$error_level)
101
		{
102
			$modx->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], $_SESSION['itemname'] . ' - Module', $error_info['message'], $error_info['line'], $msg);

manager/includes/document.parser.class.inc.php 1 location

@@ 6268-6278 (lines=11) @@
6265
        if (isset($actionName) && !empty($actionName)) {
6266
            $source .= $actionName;
6267
        }
6268
        switch ($nr) {
6269
            case E_DEPRECATED :
6270
            case E_USER_DEPRECATED :
6271
            case E_STRICT :
6272
            case E_NOTICE :
6273
            case E_USER_NOTICE :
6274
                $error_level = 2;
6275
                break;
6276
            default:
6277
                $error_level = 3;
6278
        }
6279
        $this->logEvent(0, $error_level, $str, $source);
6280
6281
        if ($error_level === 2 && $this->error_reporting !== '99') {