From 93be41e8066aee00df7c4d1124d078719a514862 Mon Sep 17 00:00:00 2001 From: knut <> Date: Tue, 5 Aug 2008 21:08:32 +0000 Subject: fixed #851 --- framework/Data/SqlMap/DataMapper/TPropertyAccess.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'framework/Data/SqlMap') diff --git a/framework/Data/SqlMap/DataMapper/TPropertyAccess.php b/framework/Data/SqlMap/DataMapper/TPropertyAccess.php index 58796ee5..23e854ac 100644 --- a/framework/Data/SqlMap/DataMapper/TPropertyAccess.php +++ b/framework/Data/SqlMap/DataMapper/TPropertyAccess.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2008 PradoSoft + * @copyright Copyright © 2005-2008 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ * @package System.Data.SqlMap @@ -67,7 +67,7 @@ class TPropertyAccess else if(is_object($object)) { $getter = 'get'.$prop; - if(is_callable(array($object,$getter))) + if(method_exists($object, $getter) && is_callable(array($object, $getter))) $object = $object->{$getter}(); else if(in_array($prop, array_keys(get_object_vars($object)))) $object = $object->{$prop}; @@ -102,7 +102,7 @@ class TPropertyAccess else if(is_object($object)) { $getter = 'get'.$prop; - if(is_callable(array($object,$getter))) + if(method_exists($object, $getter) && is_callable(array($object, $getter))) $object = $object->{$getter}(); else if(in_array($prop, array_keys(get_object_vars($object)))) $object = $object->{$prop}; @@ -137,7 +137,7 @@ class TPropertyAccess else if(is_object($object)) { $setter = 'set'.$prop; - if (method_exists($object,$setter)) + if (method_exists($object, $setter) && is_callable(array($object, $setter))) $object->{$setter}($value); else $object->{$prop} = $value; @@ -148,4 +148,4 @@ class TPropertyAccess } -?> +?> -- cgit v1.2.3