diff --git a/src/Psalm/Internal/Codebase/Functions.php b/src/Psalm/Internal/Codebase/Functions.php index 7435756a9..9ba277fec 100644 --- a/src/Psalm/Internal/Codebase/Functions.php +++ b/src/Psalm/Internal/Codebase/Functions.php @@ -425,7 +425,7 @@ class Functions 'call_user_func', 'call_user_func_array', 'define', 'create_function', // http - 'header', 'header_remove', 'http_response_code', 'setcookie', + 'header', 'header_remove', 'http_response_code', 'setcookie', 'setrawcookie', // output buffer 'ob_start', 'ob_end_clean', 'ob_get_clean', 'readfile', 'printf', 'var_dump', 'phpinfo', diff --git a/tests/UnusedCodeTest.php b/tests/UnusedCodeTest.php index c9ea004b7..fdbced4a0 100644 --- a/tests/UnusedCodeTest.php +++ b/tests/UnusedCodeTest.php @@ -666,6 +666,13 @@ class UnusedCodeTest extends TestCase return $c; }', ], + 'setRawCookieImpure' => [ + 'code' => ' [ 'code' => '