소스 검색

Update Json.php

Handling null value without json_last_error.
Siad Ardroumli 12 년 전
부모
커밋
f8b16631b4
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      library/Zend/Json.php

+ 3 - 1
library/Zend/Json.php

@@ -77,7 +77,9 @@ class Zend_Json
 
             // php < 5.3
             if (!function_exists('json_last_error')) {
-                if ($decode === null) {
+                if ($encodedValue === 'null') {
+                    return null;
+                } elseif ($decode === null) {
                     require_once 'Zend/Json/Exception.php';
                     throw new Zend_Json_Exception('Decoding failed');
                 }