summaryrefslogtreecommitdiff
path: root/framework/TComponent.php
diff options
context:
space:
mode:
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));
}