note 60162 rejected from function.in-array by nlopess

From: Date: Wed, 28 Dec 2005 16:34:00 +0000
Subject: note 60162 rejected from function.in-array by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-100868@lists.php.net to get a copy of this message
Note Submitter: jeff-php at cyberrodent dot com ---- $my_array = new Array(); if in_array($stuff, $my_array) ... will complain with a "wrong Datatype" error - confusing the empty array with something that is not an array. PHP Warning: in_array(): Wrong datatype for second argument this seems to me to be a bug, or at least the wrong text for this message.

« previous php.notes (#100868) next »