Issues

ZF-4911: Set of "Zend_Json_Exception: Illegal escape sequence 'u'" exceptions

Issue Type: Unit Tests: Problem Created: 2008-11-11T10:47:40.000+0000 Last Updated: 2009-01-05T13:36:57.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Alexander Veremyev (alexander) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Service_Twitter

Related issues: Attachments:

Description

{panel} 5) testJsonSearchContainsWordReturnsArray(Zend_Service_Twitter_SearchTest) Zend_Json_Exception: Illegal escape sequence 'u' /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:386 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:219 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:265 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:180 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:220 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:159 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json.php:74 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Service/Twitter/Search.php:164

  1. testJsonSearchRestrictsLanguageReturnsArray(Zend_Service_Twitter_SearchTest) Zend_Json_Exception: Illegal escape sequence 'u' /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:386 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:219 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:265 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:180 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:220 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:159 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json.php:74 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Service/Twitter/Search.php:164

  2. testJsonSearchReturnThirtyResultsReturnsArray(Zend_Service_Twitter_SearchTest) Zend_Json_Exception: Illegal escape sequence 'u' /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:386 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:219 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:265 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:180 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:220 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:159 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json.php:74 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Service/Twitter/Search.php:164 {panel}

Comments

Posted by Matthew Weier O'Phinney (matthew) on 2008-11-11T12:26:33.000+0000

This looks like it's likely malformed JSON returned by Twitter. That said, it would be interesting to see if the results change based on whether or not ext/json is used (currently, it's falling back to Zend_Json_Decoder, which means ext/json is not enabled on the test machine.

Posted by Alexander Veremyev (alexander) on 2008-11-11T13:28:53.000+0000

It's actually Zend_Json issue. it doesn't support '.... \uXXXX....' strings encoding for unicode characters now.

Zend_JsonTest test should be corrected to keep value of Zend_Json::$useBuiltinEncoderDecoder and not to switch between Zend_Json and PHP::json_decode()

Posted by Alexander Veremyev (alexander) on 2008-11-12T02:36:16.000+0000

Fixed

Posted by Wil Sinclair (wil) on 2008-11-13T14:10:02.000+0000

Changing issues in preparation for the 1.7.0 release.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts