Passed
Push — develop ( a5e531...6c1b0f )
by Jens
03:22
created
cloudcontrol/library/cc/ErrorHandlingUtil.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	private static function renderCliException($message, $file, $line, $trace, $lines)
76 76
 	{
77 77
 		if (ob_get_contents()) ob_end_clean();
78
-		include(__DIR__ . DIRECTORY_SEPARATOR . 'errortemplates/errorviewcli.php');
78
+		include(__DIR__.DIRECTORY_SEPARATOR.'errortemplates/errorviewcli.php');
79 79
 		exit;
80 80
 	}
81 81
 
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	private static function dontShowError($message, $file, $line, $httpHeader)
89 89
 	{
90
-		header($_SERVER['SERVER_PROTOCOL'] . $httpHeader, true);
91
-		header('X-Error-Message: ' . $message);
92
-		header('X-Error-File: ' . $file);
93
-		header('X-Error-Line: ' . $line);
94
-		if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'errortemplates/errorviewcompact.php')) {
95
-			include(__DIR__ . DIRECTORY_SEPARATOR . 'errortemplates/errorviewcompact.php');
90
+		header($_SERVER['SERVER_PROTOCOL'].$httpHeader, true);
91
+		header('X-Error-Message: '.$message);
92
+		header('X-Error-File: '.$file);
93
+		header('X-Error-Line: '.$line);
94
+		if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'errortemplates/errorviewcompact.php')) {
95
+			include(__DIR__.DIRECTORY_SEPARATOR.'errortemplates/errorviewcompact.php');
96 96
 		} else {
97 97
 			header('Content-type: application/json');
98 98
 			die(json_encode('An error occured.'));
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
 			'httpHeader' => $httpHeader,
161 161
 		);
162 162
 
163
-		if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'errortemplates/errorviewdetailed.php')) {
164
-			header($_SERVER['SERVER_PROTOCOL'] . $httpHeader, true);
165
-			include(__DIR__ . DIRECTORY_SEPARATOR . 'errortemplates/errorviewdetailed.php');
163
+		if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'errortemplates/errorviewdetailed.php')) {
164
+			header($_SERVER['SERVER_PROTOCOL'].$httpHeader, true);
165
+			include(__DIR__.DIRECTORY_SEPARATOR.'errortemplates/errorviewdetailed.php');
166 166
 		} else {
167
-			header($_SERVER['SERVER_PROTOCOL'] . $httpHeader, true);
167
+			header($_SERVER['SERVER_PROTOCOL'].$httpHeader, true);
168 168
 			header('Content-type: application/json');
169 169
 			die(json_encode($error));
170 170
 		}
Please login to merge, or discard this patch.