iliaa Wed Nov 15 18:34:57 2006 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/iconv/tests bug37773.phpt
Modified files:
/php-src NEWS
/php-src/ext/iconv iconv.c
Log:
Fixed bug #37773 (iconv_substr() gives "Unknown error" when string length =
1").
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.364&r2=1.2027.2.547.2.365&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.364 php-src/NEWS:1.2027.2.547.2.365
--- php-src/NEWS:1.2027.2.547.2.364 Wed Nov 15 16:05:11 2006
+++ php-src/NEWS Wed Nov 15 18:34:56 2006
@@ -81,6 +81,8 @@
(Dmitry)
- Fixed bug #38456 (Apache2 segfaults when virtual() is called in .php
ErrorDocument). (Ilia)
+- Fixed bug #37773 (iconv_substr() gives "Unknown error" when string length =
1").
+ (Ilia)
- Fixed bug #36975 (natcasesort() causes array_pop() to misbehave). (Hannes)
- Fixed bug #36812 (pg_execute() modifies input array). (Ilia)
- Fixed bug #36644 (possible crash in variant_date_from_timestamp()). (Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.124.2.8.2.7&r2=1.124.2.8.2.8&diff_format=u
Index: php-src/ext/iconv/iconv.c
diff -u php-src/ext/iconv/iconv.c:1.124.2.8.2.7
php-src/ext/iconv/iconv.c:1.124.2.8.2.8
--- php-src/ext/iconv/iconv.c:1.124.2.8.2.7 Tue Sep 12 17:26:34 2006
+++ php-src/ext/iconv/iconv.c Wed Nov 15 18:34:57 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: iconv.c,v 1.124.2.8.2.7 2006/09/12 17:26:34 tony2001 Exp $ */
+/* $Id: iconv.c,v 1.124.2.8.2.8 2006/11/15 18:34:57 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -744,7 +744,9 @@
}
}
- _php_iconv_appendl(pretval, buf, sizeof(buf), cd2);
+ if (_php_iconv_appendl(pretval, buf, sizeof(buf), cd2)
!= PHP_ICONV_ERR_SUCCESS) {
+ break;
+ }
--len;
}
@@ -762,10 +764,6 @@
case E2BIG:
break;
-
- default:
- err = PHP_ICONV_ERR_UNKNOWN;
- break;
}
#endif
if (err == PHP_ICONV_ERR_SUCCESS) {
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/tests/bug37773.phpt?view=markup&rev=1.1
Index: php-src/ext/iconv/tests/bug37773.phpt
+++ php-src/ext/iconv/tests/bug37773.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php