php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68175 RegexIterator pregFlags are NULL instead of 0
Submitted: 2014-10-07 10:37 UTC Modified: 2018-08-18 12:41 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: tim_siebels_aurich at yahoo dot de Assigned: cmb (profile)
Status: Closed Package: SPL related
PHP Version: Irrelevant OS: irrelevant
Private report: No CVE-ID: None
 [2014-10-07 10:37 UTC] tim_siebels_aurich at yahoo dot de
Description:
------------
The default value for RegexIterator's pregFlags is supposed to be zero, but it is NULL. This is inconsistent.

Test script:
---------------
http://3v4l.org/cRmui

<?php

$arr = new ArrayIterator(array());
$regex = new RegexIterator($arr, '/^test/');
var_dump($regex->getMode(),
         $regex->getFlags(),
         $regex->getPregFlags()
        );

Expected result:
----------------
int(0)
int(0)
int(0) 

Actual result:
--------------
int(0)
int(0)
NULL

Patches

RegexIterator_getPregFlags_zero (last revision 2014-10-07 11:03 UTC by tim_siebels_aurich at yahoo dot de)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-07 15:29 UTC] datibbaw@php.net
-Assigned To: +Assigned To: datibbaw
 [2017-10-24 07:15 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: datibbaw +Assigned To:
 [2018-08-18 12:41 UTC] cmb@php.net
Automatic comment on behalf of tim_siebels_aurich@yahoo.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3257d22fea101453682941a9a74643e33c6f8ed5
Log: Fix #68175: RegexIterator pregFlags are NULL instead of 0
 [2018-08-18 12:41 UTC] cmb@php.net
-Status: Open +Status: Closed
 [2018-08-18 12:41 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