#47029 [NEW]: quoted_printable_decode() produces duplicate warning
| From: | wharmby at uk dot ibm dot com | Date: | Wed, 07 Jan 2009 17:04:35 +0000 |
| Subject: | #47029 [NEW]: quoted_printable_decode() produces duplicate warning | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-132635@lists.php.net to get a copy of this message | ||
From: wharmby at uk dot ibm dot com
Operating system: Windows XP
PHP version: 5.3CVS-2009-01-07 (snap)
PHP Bug Type: Scripting Engine problem
Bug description: quoted_printable_decode() produces duplicate warning
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 bug report at http://bugs.php.net/?id=47029&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47029&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47029&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47029&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47029&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47029&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47029&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47029&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47029&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47029&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47029&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47029&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47029&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47029&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47029&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47029&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47029&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47029&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47029&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47029&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47029&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47029&r=mysqlcfg