#40798 [NEW]: Array of mysql_result items not recognized as such

From: Date: Wed, 14 Mar 2007 01:09:57 +0000
Subject: #40798 [NEW]: Array of mysql_result items not recognized as such
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-110320@lists.php.net to get a copy of this message
From: mailme at granville dot nl Operating system: WINDOWS XP PHP version: 5.2.1 PHP Bug Type: MySQL related Bug description: Array of mysql_result items not recognized as such Description: ------------ SITUATION: I build an array using $array[] = mysql_result($resource, $record, $column);. Afterwards I want to seek in the array using if (in_array($needle,array)) but I get an error "Warning: in_array() [function.in-array]: Wrong datatype for second argument". If one line higher I test using is_array() I will get true and using print_r() also gives me the array contents. If I add an extra item to the array using $array[] = 'string'. The error is not given -- Edit bug report at http://bugs.php.net/?id=40798&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40798&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40798&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40798&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40798&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40798&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40798&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40798&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40798&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40798&r=support Expected behavior: http://bugs.php.net/fix.php?id=40798&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40798&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40798&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40798&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40798&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40798&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40798&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40798&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40798&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40798&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40798&r=mysqlcfg

« previous php.bugs (#110320) next »