lbarnaud Fri May 1 00:18:10 2009 UTC
Modified files:
/php-src/main rfc1867.c
Log:
cleanup
http://cvs.php.net/viewvc.cgi/php-src/main/rfc1867.c?r1=1.208&r2=1.209&diff_format=u
Index: php-src/main/rfc1867.c
diff -u php-src/main/rfc1867.c:1.208 php-src/main/rfc1867.c:1.209
--- php-src/main/rfc1867.c:1.208 Fri May 1 00:15:07 2009
+++ php-src/main/rfc1867.c Fri May 1 00:18:09 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: rfc1867.c,v 1.208 2009/05/01 00:15:07 lbarnaud Exp $ */
+/* $Id: rfc1867.c,v 1.209 2009/05/01 00:18:09 lbarnaud Exp $ */
/*
* This product includes software developed by the Apache Group
@@ -202,14 +202,10 @@
UErrorCode status = U_ZERO_ERROR;
UChar *buf;
int buf_len = 0;
- UConverter *input_conv = UG(http_input_encoding_conv);
+ UConverter *input_conv = ZEND_U_CONVERTER(UG(http_input_encoding_conv));
- if (!input_conv) {
- input_conv = ZEND_U_CONVERTER(UG(output_encoding_conv));
- }
-
- input_conv = ZEND_U_CONVERTER(UG(output_encoding_conv));
zend_string_to_unicode_ex(input_conv, &buf, &buf_len, in, in_len,
&status);
+
if (U_SUCCESS(status)) {
if (out_len)
*out_len = buf_len;
@@ -1134,6 +1130,9 @@
efree(array_index);
}
array_index = eustrndup(start_arr+1,
array_len-2);
+
+ if (abuf) efree(abuf);
+ abuf = eustrndup(param,
u_strlen(param)-array_len);
}
if (lbuf) {
@@ -1142,11 +1141,6 @@
llen = u_strlen(param) + MAX_SIZE_OF_INDEX + 1;
lbuf = eumalloc(llen);
- if (is_arr_upload) {
- if (abuf) efree(abuf);
- abuf = eustrndup(param,
u_strlen(param)-array_len);
- }
-
/* The \ check should technically be needed for win32
systems only where
* it is a valid path separator. However, IE in all its
wisdom always sends
* the full path of the file on the user's filesystem,
which means that unless
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php