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

@@ 6522-6532 (lines=11) @@
6519
        if (isset($actionName) && !empty($actionName)) {
6520
            $source .= $actionName;
6521
        }
6522
        switch ($nr) {
6523
            case E_DEPRECATED :
6524
            case E_USER_DEPRECATED :
6525
            case E_STRICT :
6526
            case E_NOTICE :
6527
            case E_USER_NOTICE :
6528
                $error_level = 2;
6529
                break;
6530
            default:
6531
                $error_level = 3;
6532
        }
6533
        $this->logEvent(0, $error_level, $str, $source);
6534
6535
        if ($error_level === 2 && $this->error_reporting !== '99') {