note 126220 added to function.vsprintf
| From: | crash at main dot php dot net | Date: | Tue, 06 Jul 2021 09:03:11 +0000 |
| Subject: | note 126220 added to function.vsprintf | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216579@lists.php.net to get a copy of this message | ||
Note that this function now throws an ValueError* as of PHP 8.0 if there is an error:
$ php -r 'var_dump(vsprintf("%d", []));'
> Fatal error: Uncaught ValueError: The arguments array must contain 1 items, 0 given in Command
> line code:1
*ValueError is new in PHP 8.0, so if you want to make your code compatible to PHP 7.x you should
test that the arguments array has the correct length.
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 213.211.215.244)
----
Manual Page -- https://php.net/manual/en/function.vsprintf.php
Edit -- https://main.php.net/note/edit/126220
Del: integrated -- https://main.php.net/note/delete/126220/integrated
Del: useless -- https://main.php.net/note/delete/126220/useless
Del: bad code -- https://main.php.net/note/delete/126220/bad+code
Del: spam -- https://main.php.net/note/delete/126220/spam
Del: non-english -- https://main.php.net/note/delete/126220/non-english
Del: in docs -- https://main.php.net/note/delete/126220/in+docs
Del: other reasons-- https://main.php.net/note/delete/126220
Reject -- https://main.php.net/note/reject/126220
Search -- https://main.php.net/manage/user-notes.php