diff --git a/resources/functionMap.php b/resources/functionMap.php index c9867cf61d..82789aea05 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -2098,7 +2098,7 @@ 'explode' => ['list|false', 'separator'=>'string', 'str'=>'string', 'limit='=>'int'], 'expm1' => ['float', 'number'=>'float'], 'extension_loaded' => ['bool', 'extension_name'=>'string'], -'extract' => ['0|positive-int', 'array'=>'array', 'flags='=>'EXTR_OVERWRITE|EXTR_SKIP|EXTR_PREFIX_SAME|EXTR_PREFIX_ALL|EXTR_PREFIX_INVALID|EXTR_IF_EXISTS|EXTR_PREFIX_IF_EXISTS|EXTR_REFS', 'prefix='=>'string|null'], +'extract' => ['0|positive-int', 'array'=>'array', 'flags='=>'int-mask', 'prefix='=>'string|null'], 'ezmlm_hash' => ['int', 'addr'=>'string'], 'fam_cancel_monitor' => ['bool', 'fam'=>'resource', 'fam_monitor'=>'resource'], 'fam_close' => ['void', 'fam'=>'resource'], diff --git a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php index f485a7adee..c3dc4df606 100644 --- a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php +++ b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php @@ -2324,6 +2324,11 @@ public function testBug13197(): void $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-13197.php'], []); } + public function testBug13434(): void + { + $this->analyse([__DIR__ . '/data/bug-13434.php'], []); + } + public function testBug13556(): void { $this->checkExplicitMixed = true; diff --git a/tests/PHPStan/Rules/Functions/data/bug-13434.php b/tests/PHPStan/Rules/Functions/data/bug-13434.php new file mode 100644 index 0000000000..2228a219b1 --- /dev/null +++ b/tests/PHPStan/Rules/Functions/data/bug-13434.php @@ -0,0 +1,11 @@ +