Code Duplication    Length = 11-14 lines in 2 locations

manager/processors/execute_module.processor.php 1 location

@@ 90-103 (lines=14) @@
87
	if (isset($php_errormsg))
88
	{
89
		$error_info = error_get_last();
90
        switch($error_info['type'])
91
        {
92
        	case E_NOTICE :
93
        		$error_level = 1;
94
        	case E_USER_NOTICE :
95
        		break;
96
        	case E_DEPRECATED :
97
        	case E_USER_DEPRECATED :
98
        	case E_STRICT :
99
        		$error_level = 2;
100
        		break;
101
        	default:
102
        		$error_level = 99;
103
        }
104
		if($modx->config['error_reporting']==='99' || 2<$error_level)
105
		{
106
			$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

@@ 6288-6298 (lines=11) @@
6285
        if (isset($actionName) && !empty($actionName)) {
6286
            $source .= $actionName;
6287
        }
6288
        switch ($nr) {
6289
            case E_DEPRECATED :
6290
            case E_USER_DEPRECATED :
6291
            case E_STRICT :
6292
            case E_NOTICE :
6293
            case E_USER_NOTICE :
6294
                $error_level = 2;
6295
                break;
6296
            default:
6297
                $error_level = 3;
6298
        }
6299
        $this->logEvent(0, $error_level, $str, $source);
6300
6301
        if ($error_level === 2 && $this->error_reporting !== '99') {