FAQ
felipe Wed Feb 20 21:59:43 2008 UTC

Modified files:
/php-src/ext/pcre/tests bug44191.phpt
Log:
New test

http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug44191.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/pcre/tests/bug44191.phpt
diff -u /dev/null php-src/ext/pcre/tests/bug44191.phpt:1.2
--- /dev/null Wed Feb 20 21:59:43 2008
+++ php-src/ext/pcre/tests/bug44191.phpt Wed Feb 20 21:59:43 2008
@@ -0,0 +1,14 @@
+--TEST--
+Bug #44191 (preg_grep messes up array index)
+--FILE--
+<?php
+
+$array = range(1, 10);
+
+preg_grep('/asdf/', $array));
+
+var_dump($array);
+
+?>
+--EXPECT--
+0123456789

Search Discussions

  • Antony Dovgal at Feb 21, 2008 at 1:38 pm
    tony2001 Thu Feb 21 13:38:54 2008 UTC

    Modified files:
    /php-src/ext/pcre/tests bug44191.phpt
    Log:
    fix test


    http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug44191.phpt?r1=1.2&r2=1.3&diff_format=u
    Index: php-src/ext/pcre/tests/bug44191.phpt
    diff -u php-src/ext/pcre/tests/bug44191.phpt:1.2 php-src/ext/pcre/tests/bug44191.phpt:1.3
    --- php-src/ext/pcre/tests/bug44191.phpt:1.2 Wed Feb 20 21:59:43 2008
    +++ php-src/ext/pcre/tests/bug44191.phpt Thu Feb 21 13:38:54 2008
    @@ -4,9 +4,7 @@
    <?php

    $array = range(1, 10);
    -
    -preg_grep('/asdf/', $array));
    -
    +preg_grep('/asdf/', $array);
    var_dump($array);

    ?>
  • Dmitry Stogov at Feb 22, 2008 at 8:31 am
    dmitry Fri Feb 22 08:31:50 2008 UTC

    Modified files:
    /php-src/ext/pcre/tests bug44191.phpt
    Log:
    Fixed test


    http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug44191.phpt?r1=1.3&r2=1.4&diff_format=u
    Index: php-src/ext/pcre/tests/bug44191.phpt
    diff -u php-src/ext/pcre/tests/bug44191.phpt:1.3 php-src/ext/pcre/tests/bug44191.phpt:1.4
    --- php-src/ext/pcre/tests/bug44191.phpt:1.3 Thu Feb 21 13:38:54 2008
    +++ php-src/ext/pcre/tests/bug44191.phpt Fri Feb 22 08:31:50 2008
    @@ -5,7 +5,10 @@

    $array = range(1, 10);
    preg_grep('/asdf/', $array);
    -var_dump($array);
    +
    +while (list($x) = each($array)) {
    + print $x;
    +}

    ?>
    --EXPECT--

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-cvs @
categoriesphp
postedFeb 20, '08 at 9:59p
activeFeb 22, '08 at 8:31a
posts3
users3
websitephp.net

People

Translate

site design / logo © 2018 Grokbase