From: rodrigo at intelligencegroup dot com dot br
Operating system: Linux (redhat 9)
PHP version: 5CVS-2003-10-27 (dev)
PHP Bug Type: Class/Object related
Bug description: Bug on get_object_vars() function
Description:
------------
The function get_object_vars() is getting back an array where public
variables is ok, but private variables is being defined with no key.
Reproduce code:
---------------
<?
class A {
private $a;
public $b;
public function A() {
$this->a = "value of a";
$this->b = "value of b";
}
}
$data = new A();
$objVars = get_object_vars($data);
var_dump($objVars);
?>
Expected result:
----------------
array(2) { ["a"]=> string(10) "value of a" ["b"]=> string(10) "value of
b" }
Actual result:
--------------
array(2) { [""]=> string(10) "value of a" ["b"]=> string(10) "value of
b" }
--
Edit bug report at http://bugs.php.net/?id=26010&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26010&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26010&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26010&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26010&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26010&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=26010&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26010&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26010&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26010&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26010&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26010&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26010&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26010&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26010&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26010&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26010&r=float