Fixes #1076: CJavaScript::encode() was not compatible with PHP 5.1

This commit is contained in:
Alexander Makarov
2012-08-01 23:57:36 +04:00
parent 7c62369aa7
commit 4fe00c919e
2 changed files with 2 additions and 1 deletions

View File

@@ -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))