Bug #33502 [Ver->Csd]: Some nullary functions don't check the number of arguments
| From: | cmb@php.net | Date: | Thu, 12 Jul 2018 13:07:26 +0000 |
| Subject: | Bug #33502 [Ver->Csd]: Some nullary functions don't check the number of arguments | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216291@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=33502&edit=1
ID: 33502
Updated by: cmb@php.net
Reported by: bah at xpto dot org
Summary: Some nullary functions don't check the number of
arguments
-Status: Verified
+Status: Closed
Type: Bug
Package: *General Issues
Operating System: *
PHP Version: 7.3Git-2018-07-12 (Git)
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6c630eefcb4936dab30d315b672f9eee0e485369
Log: Fix #33502: Some nullary functions don't check the number of arguments
Previous Comments:
------------------------------------------------------------------------
[2018-07-12 13:01:21] cmb@php.net
We had some discussion about this issue on the internals mailing
list[1], and have decided to treat this as bug, but for BC reasons
to apply the fix the master only.
Besides output_reset_rewrite_vars(), the following functions are
also affected:
* func_num_args()
* gc_status()
* gc_disable()
* gc_enable()
* gc_enabled()
* gc_collect_cycles()
* gc_mem_caches()
* zend_version()
[1] <https://externals.io/message/102553>
------------------------------------------------------------------------
[2005-06-28 21:44:38] bah at xpto dot org
Description:
------------
Index: output.c
===================================================================
RCS file: /repository/php-src/main/output.c,v
retrieving revision 1.166
diff -u -r1.166 output.c
--- output.c 28 Apr 2005 14:20:28 -0000 1.166
+++ output.c 28 Jun 2005 19:41:33 -0000
@@ -1042,6 +1042,10 @@
Reset(clear) URL rewriter values */
PHP_FUNCTION(output_reset_rewrite_vars)
{
+ if (ZEND_NUM_ARGS() != 0) {
+ ZEND_WRONG_PARAM_COUNT();
+ }
+
if (php_url_scanner_reset_vars(TSRMLS_C) == SUCCESS) {
RETURN_TRUE;
} else {
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=33502&edit=1