mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-05 07:44:05 +01:00
Fixes #1076: CJavaScript::encode() was not compatible with PHP 5.1
This commit is contained in:
@@ -82,7 +82,7 @@ class CJavaScript
|
||||
return rtrim(sprintf('%.16F',$value),'0'); // locale-independent representation
|
||||
}
|
||||
else if($value instanceof CJavaScriptExpression)
|
||||
return (string)$value;
|
||||
return $value->__toString();
|
||||
else if(is_object($value))
|
||||
return self::encode(get_object_vars($value));
|
||||
else if(is_array($value))
|
||||
|
||||
Reference in New Issue
Block a user