cvs: pear /File_IMC/File/IMC Parse.php
| From: | Paul Jones | Date: | Thu, 13 Nov 2003 15:32:38 +0000 |
| Subject: | cvs: pear /File_IMC/File/IMC Parse.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-14249@lists.php.net to get a copy of this message | ||
pmjones Thu Nov 13 10:32:38 2003 EDT
Modified files:
/pear/File_IMC/File/IMC Parse.php
Log:
Changed _parseBlock() so that count() is not part of the for-loop arguments; this way, we only
count($source) one time before the loop, not every loop iteration.
Index: pear/File_IMC/File/IMC/Parse.php
diff -u pear/File_IMC/File/IMC/Parse.php:1.3 pear/File_IMC/File/IMC/Parse.php:1.4
--- pear/File_IMC/File/IMC/Parse.php:1.3 Thu Nov 13 10:26:20 2003
+++ pear/File_IMC/File/IMC/Parse.php Thu Nov 13 10:32:38 2003
@@ -16,7 +16,7 @@
// | Authors: Paul M. Jones <pjones@ciaweb.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Parse.php,v 1.3 2003/11/13 15:26:20 pmjones Exp $
+// $Id: Parse.php,v 1.4 2003/11/13 15:32:38 pmjones Exp $
/**
*
@@ -292,8 +292,9 @@
function _parseBlock(&$source)
{
+ $max = count($source);
- for ($this->count++; $this->count < count($source); $this->count++) {
+ for ($this->count++; $this->count < $max; $this->count++) {
$line = $source[$this->count];