ID: 47029
Updated by: [email protected]
Reported By: wharmby at uk dot ibm dot com
Status: Open
Bug Type: Scripting Engine problem
Operating System: Windows XP
PHP Version: 5.3CVS-2009-01-07 (snap)
New Comment:
Go ahead and fix this yourself if you have karma.
Previous Comments:
------------------------------------------------------------------------
[2009-01-07 17:04:34] wharmby at uk dot ibm dot com
Description:
------------
Duplicate warning messages issued by quoted_printable_decode () when
invalid input supplied:
Problem only on 5.3; PHP 5.2 and 6 code OK.
Fix is to remove the call to WRONG_PARAM_COUNT on line 206 of
quot_print.c and replace with a "return" as in following patch.
### Eclipse Workspace Patch 1.0
#P php-5.3
Index: ext/standard/quot_print.c
===================================================================
RCS file: /repository/php-src/ext/standard/quot_print.c,v
retrieving revision 1.29.2.2.2.1.2.5
diff -u -r1.29.2.2.2.1.2.5 quot_print.c
--- ext/standard/quot_print.c 31 Dec 2008 11:15:45
-0000 1.29.2.2.2.1.2.5
+++ ext/standard/quot_print.c 7 Jan 2009 16:53:40 -0000
@@ -203,7 +203,7 @@
int arg1_len, i = 0, j = 0, k;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arg1,
&arg1_len) == FAILURE) {
- WRONG_PARAM_COUNT;
+ return;
}
if (arg1_len == 0) {
Reproduce code:
---------------
<?php
quoted_printable_decode("", true);
?>
Expected result:
----------------
Warning: quoted_printable_decode() expects exactly 1 parameter, 2 given
in <script path> on line 3
Actual result:
--------------
Warning: quoted_printable_decode() expects exactly 1 parameter, 2 given
in <script path> on line 3
Warning: Wrong parameter count for quoted_printable_decode() in <script
path> on line 3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47029&edit=1