(Fixes issue 1093) CJSON now tries to use native PHP functions prior to use Yii implementation (Sam Dark)

This commit is contained in:
alexander.makarow
2010-04-16 20:00:18 +00:00
parent 9548360a37
commit ef91da9b99
3 changed files with 9 additions and 10 deletions

View File

@@ -104,12 +104,7 @@ class CJavaScript
*/
public static function jsonEncode($data)
{
if(function_exists('json_encode'))
return json_encode($data);
else
{
return CJSON::encode($data);
}
return CJSON::encode($data);
}
/**
@@ -120,9 +115,6 @@ class CJavaScript
*/
public static function jsonDecode($data,$useArray=true)
{
if(function_exists('json_decode'))
return json_decode($data,$useArray);
else
return CJSON::decode($data,$useArray);
return CJSON::decode($data,$useArray);
}
}