ID:               47029
 User updated by:  wharmby at uk dot ibm dot com
 Reported By:      wharmby at uk dot ibm dot com
 Status:           Closed
 Bug Type:         Strings related
 Operating System: Windows XP
 PHP Version:      5.3CVS-2009-01-07 (snap)
 New Comment:

Thanks guys. By the time I saw Scott's msg Felipe had applied the patch
to 5.3


Previous Comments:
------------------------------------------------------------------------

[2009-01-07 17:22:46] fel...@php.net

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2009-01-07 17:16:20] scott...@php.net

Go ahead and fix this yourself if you have karma.

------------------------------------------------------------------------

[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

Reply via email to