diff options
author | wei <> | 2006-07-16 06:19:36 +0000 |
---|---|---|
committer | wei <> | 2006-07-16 06:19:36 +0000 |
commit | c7d41e5bea4a5f96979a08da9cc9f79355edfe70 (patch) | |
tree | 8f21cba052c1eae7c7204ac272dd8c5e9d6fe110 /framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php | |
parent | af68030fcf0c266300feb2c100149ecadef7d364 (diff) |
Update Time Tracker demo.
Diffstat (limited to 'framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php')
-rw-r--r-- | framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php b/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php index 4bbe2cb5..e4f5c1fa 100644 --- a/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php +++ b/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php @@ -39,7 +39,7 @@ class TPropertyAccess */
public static function get($object,$path)
{
- if(!is_array($object) || !is_object($object))
+ if(!is_array($object) && !is_object($object))
return $object;
$properties = explode('.', $path);
foreach($properties as $prop)
@@ -49,7 +49,7 @@ class TPropertyAccess if(isset($object[$prop]))
$object = $object[$prop];
else
- throw new TInvalidPropertyException('sqlmap_invalid_property',$path);
+ throw new TInvalidPropertyException('sqlmap_invalid_property',$path);
}
else if(is_object($object))
{
@@ -69,7 +69,7 @@ class TPropertyAccess public static function has($object, $path)
{
- if(!is_array($object) || !is_object($object))
+ if(!is_array($object) && !is_object($object))
return false;
$properties = explode('.', $path);
foreach($properties as $prop)
|