Hello Stanislav, Wednesday, January 30, 2008, 4:17:57 AM, you wrote:
> stas Wed Jan 30 03:17:57 2008 UTC > Added files: (Branch: PHP_5_3) > /php-src/ext/json/tests bug43941.phpt > Modified files: > /php-src/ext/json json.c utf8_to_utf16.c > Log: > fix #43941: invalid utf-8 not accepted > > > http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.9.2.19.2.4&r2=1.9.2.19.2.5&diff_format=u > Index: php-src/ext/json/json.c > diff -u php-src/ext/json/json.c:1.9.2.19.2.4 > php-src/ext/json/json.c:1.9.2.19.2.5 > --- php-src/ext/json/json.c:1.9.2.19.2.4 Mon Dec 31 07:17:09 2007 > +++ php-src/ext/json/json.c Wed Jan 30 03:17:57 2008 > @@ -16,7 +16,7 @@ > +----------------------------------------------------------------------+ > */ > > -/* $Id: json.c,v 1.9.2.19.2.4 2007/12/31 07:17:09 sebastian Exp $ */ > +/* $Id: json.c,v 1.9.2.19.2.5 2008/01/30 03:17:57 stas Exp $ */ > > #ifdef HAVE_CONFIG_H > #include "config.h" > @@ -269,8 +269,14 @@ > { > efree(utf16); > } > - > - smart_str_appendl(buf, "\"\"", 2); > + if(len < 0) { > + if(!PG(display_errors)) { > + php_error_docref(NULL TSRMLS_CC, > E_WARNING, "Invalid UTF-8 sequence in > argument"); > + } > + smart_str_appendl(buf, "null", 4); > + } else { > + smart_str_appendl(buf, "\"\"", 2); > + } Funny whitespace :-) Best regards, Marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php