Bug #15602 Updated: get_object_vars() does not return empty vars
| From: | daniela@php.net | Date: | Fri, 15 Mar 2002 15:36:37 +0000 |
| Subject: | Bug #15602 Updated: get_object_vars() does not return empty vars | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-2586@lists.php.net to get a copy of this message | ||
ID: 15602
Updated by: daniela@php.net
Reported By: ludo@sumatrasolutions.com
Status: Closed
Bug Type: Feature/Change Request
Operating System: any
PHP Version: 4.1.1
New Comment:
I committed the new ibase_fetch_assoc function a few minutes ago.......
Previous Comments:
------------------------------------------------------------------------
[2002-03-15 07:26:14] ludoo@php.net
- get_object_vars() now works as expected
- a patch was committed against the interbase module to return NULL
fields from Interbase, instead of ignoring them
- a patch is going to be committed to CVS to add an ibase_fetch_assoc()
function
------------------------------------------------------------------------
[2002-02-18 15:16:03] ludo@sumatrasolutions.com
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 this bug report at http://bugs.php.net/?id=15602&edit=1