diff options
Diffstat (limited to 'framework/Data')
-rw-r--r-- | framework/Data/SqlMap/DataMapper/TPropertyAccess.php | 10 |
1 files changed, 5 insertions, 5 deletions
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 <weizhuo[at]gmail[dot]com>
* @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 }
-?> +?>
|