iliaa Tue Mar 30 18:58:48 2004 EDT
Modified files:
/php-src run-tests.php
Log:
Fixed generate_array_diff().
http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.192&r2=1.193&ty=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.192 php-src/run-tests.php:1.193
--- php-src/run-tests.php:1.192 Mon Mar 29 02:49:32 2004
+++ php-src/run-tests.php Tue Mar 30 18:58:47 2004
@@ -1039,23 +1039,19 @@
if ($k1 == $l1+1 || $k2 === NULL) {
$l1 = $k1;
$diff[] = current($old1);
- next($old1);
- $k1 = key($old1);
+ $k1 = next($old1) ? key($old1) : NULL;
} else if ($k2 == $l2+1 || $k1 === NULL) {
$l2 = $k2;
$diff[] = current($old2);
- next($old2);
- $k2 = key($old2);
+ $k2 = next($old2) ? key($old2) : NULL;
} else if ($k1 < $k2) {
$l1 = $k1;
$diff[] = current($old1);
- next($old1);
- $k1 = key($old1);
+ $k1 = next($old1) ? key($old1) : NULL;
} else {
$l2 = $k2;
$diff[] = current($old2);
- next($old2);
- $k2 = key($old2);
+ $k2 = next($old2) ? key($old2) : NULL;
}
}
while ($idx1 < $cnt1) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php