mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
661bce47ae
Per documentation, and consistent with other preg functions, we should return false if an error occurred.
21 lines
400 B
PHP
21 lines
400 B
PHP
--TEST--
|
|
Bug #70345 (Multiple vulnerabilities related to PCRE functions)
|
|
--FILE--
|
|
<?php
|
|
$regex = '/(?=xyz\K)/';
|
|
$subject = "aaaaxyzaaaa";
|
|
|
|
var_dump(preg_split($regex, $subject));
|
|
|
|
$regex = '/(a(?=xyz\K))/';
|
|
$subject = "aaaaxyzaaaa";
|
|
preg_match($regex, $subject, $matches);
|
|
|
|
var_dump($matches);
|
|
--EXPECTF--
|
|
bool(false)
|
|
|
|
Warning: preg_match(): Get subpatterns list failed in %s on line %d
|
|
array(0) {
|
|
}
|