yiisoft/yii — pull request #1727 by heyhoo (2012-11-19 13:48:37+00:00)
Title: Issue #1726

Undefined variable: json

yii-1.1.12.b600af/framework/web/helpers/CJSON.php(332)

324 public static function decode($str, $useArray=true)
325 {
326 if(function_exists('json_decode'))
327 $json = json_decode($str,$useArray);
328
329 // based on investigation, native fails sometimes returning null.
330 // see: http://gggeek.altervista.org/sw/article_20070425.html
331 // As of PHP 5.3.6 it still fails on some valid JSON strings
332 if(!is_null($json))
333 return $json;