#49802 [NEW]: Irritating error message when passing irregular arguments for parsing (sprintf)
| From: | timm dot forallthestuff at web dot de | Date: | Wed, 07 Oct 2009 12:45:52 +0000 |
| Subject: | #49802 [NEW]: Irritating error message when passing irregular arguments for parsing (sprintf) | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-2897@lists.php.net to get a copy of this message | ||
From: timm dot forallthestuff at web dot de
Operating system: Windows 7
PHP version: 5.3.0
PHP Bug Type: Documentation problem
Bug description: Irritating error message when passing irregular arguments for parsing (sprintf)
Description:
------------
The error message displayed by php is irritating and not describing the
problem correcly, when an argument in sprintf is incorrect (%$1s instead of
%1$s).
PHP Xampp installation, not really changed anything, so should be about
the default.
Reproduce code:
---------------
$string = 'foo %$1s';
var_dump(sprintf($string, 'bar'));
---
From manual page: function.sprintf#Parameter-Liste
---
Expected result:
----------------
E_WARNING: error while parsing
(or similiar)
Actual result:
--------------
Warning: sprintf() [function.sprintf]: Argument number must be greater
than zero in
--
Edit bug report at http://bugs.php.net/?id=49802&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49802&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49802&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49802&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49802&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49802&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49802&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49802&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49802&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49802&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49802&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49802&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49802&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49802&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49802&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49802&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49802&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49802&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49802&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49802&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49802&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49802&r=mysqlcfg