#32484 [Opn->Csd]: in_array() doesn't return with an undefined array
| From: | sniper@php.net | Date: | Tue, 29 Mar 2005 12:54:34 +0000 |
| Subject: | #32484 [Opn->Csd]: in_array() doesn't return with an undefined array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-77013@lists.php.net to get a copy of this message | ||
ID: 32484
Updated by: sniper@php.net
Reported By: edwin at mavetju dot org
-Status: Open
+Status: Closed
Bug Type: Arrays related
Operating System: FreeBSD 5.2.1
PHP Version: 4.3.10
New Comment:
Works fine with latest CVS / PHP 4.3.11RC2 / PHP 5.0.4RC2
Previous Comments:
------------------------------------------------------------------------
[2005-03-29 14:50:21] edwin at mavetju dot org
Description:
------------
I know this is wrong programming style, but in_array() hangs on this
FreeBSD 5.2.1 box with PHP 4.3.10 when the haystack is an undefined
array.
It has the expected behaviour on FreeBSD 4.x and FreeBSD 5.3, it's just
showing up in 5.2.1.
This is an FYI bug report, it might be that you have had similar
reports but never been able to put your fingers on the place where it
hurted.
Reproduce code:
---------------
$a=array("foo");
if (!@in_array("bar",$a["foo"])) {
echo "Not there\n";
}
Expected result:
----------------
"Not there"
Actual result:
--------------
The interpreter hangs in the in_array() function.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32484&edit=1