summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/TComponent.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/TComponent.php b/framework/TComponent.php
index 54fe7ec7..9af42a9a 100644
--- a/framework/TComponent.php
+++ b/framework/TComponent.php
@@ -515,7 +515,9 @@ class TPropertyValue
public static function ensureBoolean($value)
{
if (is_string($value))
- return strcasecmp($value,'true')==0 || $value!=0;
+ return strcasecmp($value,'true')==0 || strcasecmp($value,'1')==0 || $value!=0;
+ if (is_int($value))
+ return $value === 1;
else
return (boolean)$value;
}