php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74433 Wrong reflection on the Normalizer methods
Submitted: 2017-04-13 11:24 UTC Modified: -
From: fabien dot villepinte at gmail dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fabien dot villepinte at gmail dot com
New email:
PHP Version: OS:

 

 [2017-04-13 11:24 UTC] fabien dot villepinte at gmail dot com
Description:
------------
The methods Normalizer::isNormalized() and Normalizer::normalize() expect the same parameters, input (required) and form (optional).

http://php.net/manual/en/normalizer.isnormalized.php
http://php.net/manual/en/normalizer.normalize.php

However the number of required parameters returned by reflection is wrong (it returns 3).

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

$rm = new ReflectionMethod(Normalizer::class, 'isNormalized');
var_dump($rm->getNumberOfParameters());
var_dump($rm->getNumberOfRequiredParameters());
$rm = new ReflectionMethod(Normalizer::class, 'normalize');
var_dump($rm->getNumberOfParameters());
var_dump($rm->getNumberOfRequiredParameters());

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

Actual result:
--------------
int(3)
int(3)
int(3)
int(3)

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-13 12:22 UTC] krakjoe@php.net
Automatic comment on behalf of fabien.villepinte@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f05d74feb886acfd9c9828158ff9af532ff4a75f
Log: Fixed bug #74433 Wrong reflection on the Normalizer methods
 [2017-04-13 12:22 UTC] krakjoe@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 16:01:30 2024 UTC