Bug #17875: sizeof() reports double the elements for an mssql_fetch_array
| From: | cusaacb at squared dot com | Date: | Thu, 20 Jun 2002 15:56:14 +0000 |
| Subject: | Bug #17875: sizeof() reports double the elements for an mssql_fetch_array | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-11573@lists.php.net to get a copy of this message | ||
From: cusaacb@squared.com
Operating system: Linux
PHP version: 4.2.1
PHP Bug Type: Arrays related
Bug description: sizeof() reports double the elements for an mssql_fetch_array
// correct behavior
$arr = array();
$arr[0] = "One";
$arr[1] = "Two";
$arr[2] = "Three";
print "Normal:   ";
print sizeof($arr) . "<BR><BR>";
//show bug
$rs = mssql_query("select '1' as one, '2' as two, '3' as three
from
tablename");
$sqlarr = mssql_fetch_array($rs);
print
"Bug:         ";
//----- HERES THE BUG
print sizeof($sqlarr) . "\n";
./configure --prefix=/usr/local/php --with-sybase=/usr/local/freetds
--with-pgsql=/usr/local/pgsql --with-apxs2=/usr/local/apache2/bin/apxs
--
Edit bug report at http://bugs.php.net/?id=17875&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17875&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17875&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17875&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17875&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17875&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17875&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17875&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17875&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17875&r=globals