Edit report at https://bugs.php.net/bug.php?id=68274&edit=1
ID: 68274
User updated by: eep at mailinator dot com
Reported by: eep at mailinator dot com
Summary: vsprintf miscounts argument count
Status: Open
Type: Bug
Package: Unknown/Other Function
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
I just realized the provided test script is bad, since second parameter is not optional.
However, even with some parameters, the argument count is still counted wrong.
printf('%s (foo %) bar', 'test');
..produces the same warning.
Previous Comments:
------------------------------------------------------------------------
[2014-10-21 13:55:43] eep at mailinator dot com
Description:
------------
vsprintf() doesn't validate formatting strings, seems to only count percent signs (followed by
pretty much anything). For example, '%)' expects one parameter.
Test script:
---------------
<?php
vsprintf('(foo %) bar');
Actual result:
--------------
Warning: Wrong parameter count for vsprintf() in /vsprintf.php on line 2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68274&edit=1