diff options
author | knut <> | 2008-08-05 21:08:32 +0000 |
---|---|---|
committer | knut <> | 2008-08-05 21:08:32 +0000 |
commit | 93be41e8066aee00df7c4d1124d078719a514862 (patch) | |
tree | d5c5b623fc9eb195ae133dba4bb837f1c49fba87 | |
parent | 20442b115c74de89373eabbe70b1bd5ba776d23c (diff) |
fixed #851
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | framework/Data/SqlMap/DataMapper/TPropertyAccess.php | 10 |
2 files changed, 6 insertions, 5 deletions
@@ -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 © 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 }
-?> +?>
|