You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stdlib: preg_grep() — enum case pattern operand must TypeError not silent pass (ext/pcre/php_pcre.c) #9025
preg_grep() argument #1 ($pattern) must be string. Passing a backed enum case must throw TypeError with Zend's message. This compiler either coerces silently or prints uncaught without surfacing the expected TypeError.
Distinct from closed #5639 (enum case array values in haystack).
Category
stdlib· php-src-strictProblem
preg_grep()argument #1 ($pattern) must bestring. Passing a backed enum case must throwTypeErrorwith Zend's message. This compiler either coerces silently or printsuncaughtwithout surfacing the expectedTypeError.Distinct from closed #5639 (enum case array values in haystack).
php-src reference
ext/pcre/php_pcre.c—php_pcre_grepargument parsingRepro
test/repro/maintainer_gap_preg_grep_enum.php(in tree):TypeError: preg_grep(): Argument #1 ($pattern) must be of type string, E givenuncaughtScope (this repo)
ext/standard/orlib/VM/preg_grep builtinVmString::coerceStringBuiltinArg/ enum guard before pattern uselib/JIT/Builtin/test/compliance/cases/stdlib/preg_grep_enum_typeerror.phptDone when
TypeErrormatching Zend message class + text./script/ci-fast.sh --filter preg_grep_enumgreenRelated