cvs: pear /DB_DataObject DataObject.php

From: Date: Sat, 22 Jan 2005 03:22:04 +0000
Subject: cvs: pear /DB_DataObject DataObject.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-28735@lists.php.net to get a copy of this message
alan_k Fri Jan 21 22:22:04 2005 EDT Modified files: /pear/DB_DataObject DataObject.php Log: fix bug #3201 - get_class_vars() with privates. ** although this now segfaults :) - see PHP bug #31651 http://cvs.php.net/diff.php/pear/DB_DataObject/DataObject.php?r1=1.311&r2=1.312&ty=u Index: pear/DB_DataObject/DataObject.php diff -u pear/DB_DataObject/DataObject.php:1.311 pear/DB_DataObject/DataObject.php:1.312 --- pear/DB_DataObject/DataObject.php:1.311 Fri Jan 21 21:37:02 2005 +++ pear/DB_DataObject/DataObject.php Fri Jan 21 22:22:03 2005 @@ -20,7 +20,7 @@ * @package DB_DataObject * @category DB * - * $Id: DataObject.php,v 1.311 2005/01/22 02:37:02 alan_k Exp $ + * $Id: DataObject.php,v 1.312 2005/01/22 03:22:03 alan_k Exp $ */ /* =========================================================================== @@ -3168,6 +3168,11 @@ // dont you just love php's case insensitivity!!!! $array = array_keys(get_class_vars($class)); + /* php5 version which segfaults on 5.0.3 */ + if (class_exists('ReflectionClass')) { + $reflection = new ReflectionClass($class); + $array = array_keys($reflection->getdefaultProperties()); + } if (!in_array($element,$array)) { // munge case

« previous php.pear.cvs (#28735) next »