Bug #15602: get_object_vars() does not return empty vars
| From: | ludo at sumatrasolutions dot com | Date: | Mon, 18 Feb 2002 20:16:04 +0000 |
| Subject: | Bug #15602: get_object_vars() does not return empty vars | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-515@lists.php.net to get a copy of this message | ||
From: ludo@sumatrasolutions.com
Operating system: any
PHP version: 4.1.1
PHP Bug Type: Feature/Change Request
Bug description: get_object_vars() does not return empty vars
I know it's documented in the manual, but aside from being less useful than
it could be (sometimes it's useful to get empty object vars too), it's
posing a few problems to the PEAR ibase DB driver.
The PHP interbase module has no way of returning a hash representation of
a row, so the two available solutions are:
a) hack something with ibase_num_fields and ibase_field_info to builf a
hash (often gets Interbase sync errors if used with a hash ref as target)
b) use ibase_fetch_object and either cast it to array, or use
get_object_vars(), in both cases rows from the same result set have a
different field number, due to missing NULLs and empty values; clearly
this is not acceptable
Two possible solutions:
- modify get_object_vars() to return all object values or
- add an ibase_fetch_array() or whatever function
--
Edit bug report at http://bugs.php.net/?id=15602&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=15602&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=15602&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=15602&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=15602&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15602&r=support
Expected behavior: http://bugs.php.net/fix.php?id=15602&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=15602&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=15602&r=submittedtwice