summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/Data/SqlMap/DataMapper/TPropertyAccess.php10
2 files changed, 6 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index 6e875caf..51063d54 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5,6 +5,7 @@ BUG: Ticket#841 - Strange output from THttpResponse (Christophe)
BUG: Ticket#847 - getBaseUrl sometimes fails (Christophe)
BUG: Ticket#843 - TDataList alternatinItem issue after changes in rev 2227 (Christophe)
BUG: Ticket#849 - TDatePicker selecting current date problem (Christophe)
+BUG: Ticket#851 - TPropertyAccess doesn't get properties right if an object has a __call() method (Simon Lehmann, Knut)
BUG: Ticket#859 - errorhandler error (stever)
BUG: Ticket#860 - Prado::localize() bug (japplegame)
BUG: Ticket#870 - Callback with redirect breaks lifecycle of page (stever)
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
}
-?>
+?>