ID: 14287
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Scripting Engine problem
Operating System: W2K
PHP Version: 4.0.6
New Comment:
Both PHP 4.1.0 and php 4.2.0 dev already show this warning:
<b>Warning</b>: Argument #2 to array_diff() is not an array in <b>-</b> on line
<b>2</b><br>
so closing,
Derick
Previous Comments:
------------------------------------------------------------------------
[2001-11-29 12:39:46] [EMAIL PROTECTED]
Seems like array_diff will take a string as second argument, e.g.
array_diff ($bla, "fred")
where $bla is an array. No error or warning will appear, and array_diff will not work
as expected (which would be removing "fred" from $bla).
Of course everything works fine using
array_diff ($bla, array ("fred"))
However, for the above case imho there should either be a compiler warning or a note
added to the manual.
Steve
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14287&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]