From 11605b8c0c86df892c206982ff18a39ca1cb2d60 Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 1 Jan 2007 17:21:22 +0000 Subject: reverted back. By convention, all non-zero values are treated as boolean true, not just 1. --- framework/TComponent.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'framework') diff --git a/framework/TComponent.php b/framework/TComponent.php index 9af42a9a..54fe7ec7 100644 --- a/framework/TComponent.php +++ b/framework/TComponent.php @@ -515,9 +515,7 @@ class TPropertyValue public static function ensureBoolean($value) { if (is_string($value)) - return strcasecmp($value,'true')==0 || strcasecmp($value,'1')==0 || $value!=0; - if (is_int($value)) - return $value === 1; + return strcasecmp($value,'true')==0 || $value!=0; else return (boolean)$value; } -- cgit v1.2.3