Whoops! JSON parser Unicode escape sequence typo.
authorDan
Sat, 04 Apr 2009 22:18:29 -0400
changeset 890 b624c55ab771
parent 889 7e933a5c860b
child 891 d75c81630571
Whoops! JSON parser Unicode escape sequence typo.
includes/json2.php
--- a/includes/json2.php	Sat Apr 04 22:17:32 2009 -0400
+++ b/includes/json2.php	Sat Apr 04 22:18:29 2009 -0400
@@ -775,6 +775,7 @@
                                 break;
                             case 'u':
                               $result .= self::decode_unicode_byte(substr($str, $i + 1, 4));
+                              $i += 4;
                               break;
                             default:
                                 throw new Zend_Json_Exception("Illegal escape "
@@ -941,6 +942,8 @@
           . chr((($value & 0x0fc0) >> 6) | 0x80)
           . chr(($value & 0x3f) | 0x80);
       }
+      
+      return $character;
     }
 }