php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75299 Wrong reflection on inflate_init and inflate_add
Submitted: 2017-10-01 09:25 UTC Modified: 2017-10-11 15:48 UTC
From: fabien dot villepinte at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Zlib related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2017-10-01 09:25 UTC] fabien dot villepinte at gmail dot com
Description:
------------
The number of parameters returned by reflection is wrong for inflate_init() and inflate_add().

See :
http://php.net/manual/en/function.inflate-init.php
http://php.net/manual/en/function.inflate-add.php


Test script:
---------------
<?php

$r = new ReflectionFunction('inflate_init');
var_dump($r->getNumberOfRequiredParameters());
var_dump($r->getNumberOfParameters());

$r = new ReflectionFunction('inflate_add');
var_dump($r->getNumberOfRequiredParameters());
var_dump($r->getNumberOfParameters());


Expected result:
----------------
int(1)
int(2)
int(2)
int(3)

Actual result:
--------------
int(1)
int(1)
int(2)
int(2)

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-11 15:47 UTC] cmb@php.net
Automatic comment on behalf of fabien.villepinte@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9d9873b3b5f6f6dcdbe7d4e981c1b5eda6d7da56
Log: Fix Bug #75299 Wrong reflection on inflate_init and inflate_add
 [2017-10-11 15:47 UTC] cmb@php.net
-Status: Open +Status: Closed
 [2017-10-11 15:48 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC