svn: /web/php-rmtools/trunk/client/include/ MakeLogParserVC.php
| From: | Pierre Joye | Date: | Tue, 23 Aug 2011 13:27:19 +0000 |
| Subject: | svn: /web/php-rmtools/trunk/client/include/ MakeLogParserVC.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-12004@lists.php.net to get a copy of this message | ||
pajoye Tue, 23 Aug 2011 13:27:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=315366
Log:
- fix logic when no match
Changed paths:
U web/php-rmtools/trunk/client/include/MakeLogParserVC.php
Modified: web/php-rmtools/trunk/client/include/MakeLogParserVC.php
===================================================================
--- web/php-rmtools/trunk/client/include/MakeLogParserVC.php 2011-08-23 13:04:17 UTC (rev 315365)
+++ web/php-rmtools/trunk/client/include/MakeLogParserVC.php 2011-08-23 13:27:19 UTC (rev 315366)
@@ -20,6 +20,8 @@
$pcre = '/(error|warning)/';
$log = array();
foreach ($lines as $line) {
+ $file = '';
+ $level = '';
$out = '#' . ($line_nr++) . ' ';
$res = preg_match($pcre, $line);
if ($res) {
@@ -101,50 +103,44 @@
} else {
$level = '';
}
- } else {
- $file = '';
- $level = '';
}
}
+ $row = array(
+ 'file' => $file,
+ 'line' => '',
+ 'level' => $level,
+ 'code' => $alphanum1,
+ 'message' => $error_msg
+ );
+ } else {
$row = array(
- 'file' => $file,
+ 'file' => '',
'line' => '',
- 'level' => $level,
- 'code' => $alphanum1,
- 'message' => $error_msg
+ 'level' => '',
+ 'code' => '',
+ 'message' => $txt
);
- } else {
- $row = array(
- 'file' => '',
- 'line' => $word1,
- 'level' => $word2,
- 'code' => $alphanum1,
- 'message' => $error_msg
- );
- }
- } else {
- continue;
}
}
}
-
- $row['file'] = str_ireplace($root_src_dir, '', $row['file']);
- $row['section'] = strtolower(dirname($row['file']));
- $row['file'] = str_ireplace($row['section'] . '\\', '',
$row['file']);
- if ($row['level'] == 'fatal') {
- $row['level'] = 'error';
- }
-
- if (isset($this->stats[$row['level']])) {
- $this->stats[$row['level']]++;
- }
- $log[] = $row;
} else {
continue;
}
+
+ $row['file'] = str_ireplace($root_src_dir, '', $row['file']);
+ $row['section'] = strtolower(dirname($row['file']));
+ $row['file'] = str_ireplace($row['section'] . '\\', '',
$row['file']);
+ if ($row['level'] == 'fatal') {
+ $row['level'] = 'error';
+ }
+
+ if (isset($this->stats[$row['level']])) {
+ $this->stats[$row['level']]++;
+ }
+ $log[] = $row;
}
$this->log = $log;
- return true;
+ return true;
}
}