[php-src] Issue #7917: preg_match and preg_match_all both do not set $matches on regex fail, leaving as it was set prior to call

From: Date: Sun, 09 Jan 2022 23:40:32 +0000
Subject: [php-src] Issue #7917: preg_match and preg_match_all both do not set $matches on regex fail, leaving as it was set prior to call
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238924@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7917 Comment Author: iluuu1994 The best behavior for PHP would probably be to throw an exception so your program never accesses $matches when providing an invalid regex in the first place. That's something worth discussing for PHP 9.

« previous php.bugs (#238924) next »