summaryrefslogtreecommitdiff
path: root/framework/TComponent.php
diff options
context:
space:
mode:
authorxue <>2005-12-06 22:53:07 +0000
committerxue <>2005-12-06 22:53:07 +0000
commitec46fdc945f591e910051aca0457097825afd34c (patch)
treeb79765ec299229678242267a7bfdf7e3c3f31349 /framework/TComponent.php
parent03142d666493516ca86dede5380344f8c05b7633 (diff)
Diffstat (limited to 'framework/TComponent.php')
-rw-r--r--framework/TComponent.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/TComponent.php b/framework/TComponent.php
index 3934bfdc..c1b483c0 100644
--- a/framework/TComponent.php
+++ b/framework/TComponent.php
@@ -538,8 +538,8 @@ class TPropertyValue
*/
public static function ensureEnum($value,$enum)
{
- if(($index=array_search($value,$enum))!==false)
- return $enum[$index];
+ if(in_array($value,$enum))
+ return $value;
else
throw new TInvalidDataValueException('propertyvalue_enumvalue_invalid',$value,implode(' | ',$enum));
}