Req->Bug #33502 [Opn->Ver]: Some nullary functions don't check the number of arguments
| From: | cmb@php.net | Date: | Thu, 12 Jul 2018 13:01:24 +0000 |
| Subject: | Req->Bug #33502 [Opn->Ver]: Some nullary functions don't check the number of arguments | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216290@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: output_reset_rewrite_vars doesnt check the number of
parameters
+Summary: Some nullary functions don't check the number of
arguments
-Status: Open
+Status: Verified
-Type: Feature/Change Request
+Type: Bug
-Package: Output Control
+Package: *General Issues
-Operating System: n/a
+Operating System: *
-PHP Version: 5CVS-2005-06-28 (dev)
+PHP Version: 7.3Git-2018-07-12 (Git)
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
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>
Previous Comments:
------------------------------------------------------------------------
[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