mirror of
https://github.com/php/php-src.git
synced 2026-04-28 10:43:30 +02: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) {
|
|
}
|