summaryrefslogtreecommitdiff
path: root/framework/Data
diff options
context:
space:
mode:
authorknut <>2008-08-05 21:08:32 +0000
committerknut <>2008-08-05 21:08:32 +0000
commit93be41e8066aee00df7c4d1124d078719a514862 (patch)
treed5c5b623fc9eb195ae133dba4bb837f1c49fba87 /framework/Data
parent20442b115c74de89373eabbe70b1bd5ba776d23c (diff)
fixed #851
Diffstat (limited to 'framework/Data')
-rw-r--r--framework/Data/SqlMap/DataMapper/TPropertyAccess.php10
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 &copy; 2005-2008 PradoSoft
+ * @copyright Copyright &copy; 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
}
-?>
+?>