We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1abe22 commit 4486f89Copy full SHA for 4486f89
cs2pr
@@ -32,16 +32,18 @@ if ($argc === 1) {
32
$exit = 0;
33
$root = simplexml_load_string($xml);
34
35
-foreach($root as $file) {
36
- $filename = (string)$file['name'];
+if($root) {
+ foreach($root as $file) {
37
+ $filename = (string)$file['name'];
38
- foreach($file as $error) {
39
- $type = (string) $error['severity'];
40
- $line = (string) $error['line'];
41
- $message = (string) $error['message'];
+ foreach($file as $error) {
+ $type = (string) $error['severity'];
+ $line = (string) $error['line'];
42
+ $message = (string) $error['message'];
43
- annotateCheck(annotateType($type), relativePath($filename), $line, $message);
44
- $exit = 1;
+ annotateCheck(annotateType($type), relativePath($filename), $line, $message);
45
+ $exit = 1;
46
+ }
47
}
48
49
0 commit comments