cvs: php-src /ext/iconv iconv.c
| From: | Michael Wallner | Date: | Sat, 09 Sep 2006 12:10:29 +0000 |
| Subject: | cvs: php-src /ext/iconv iconv.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-40399@lists.php.net to get a copy of this message | ||
mike Sat Sep 9 12:10:29 2006 UTC
Modified files:
/php-src/ext/iconv iconv.c
Log:
- fix crash when unicode.sematics are enabled and unicode.output_encoding doesn't match
iconv.internal_encoding
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.143&r2=1.144&diff_format=u
Index: php-src/ext/iconv/iconv.c
diff -u php-src/ext/iconv/iconv.c:1.143 php-src/ext/iconv/iconv.c:1.144
--- php-src/ext/iconv/iconv.c:1.143 Thu Sep 7 14:21:02 2006
+++ php-src/ext/iconv/iconv.c Sat Sep 9 12:10:28 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: iconv.c,v 1.143 2006/09/07 14:21:02 mike Exp $ */
+/* $Id: iconv.c,v 1.144 2006/09/09 12:10:28 mike Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -343,8 +343,7 @@
output_encoding = INI_STR("unicode.output_encoding");
if (output_encoding && *output_encoding && ucnv_compareNames(output_encoding,
ICONVG(internal_encoding))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unicode.output_encoding differs from
iconv.internal_encoding (%s, %s)", output_encoding, ICONVG(internal_encoding));
- efree(ICONVG(input_encoding));
- ICONVG(input_encoding) = estrdup(output_encoding);
+ zend_alter_ini_entry(ZEND_STRS("iconv.internal_encoding"), output_encoding,
strlen(output_encoding), PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
}
}