Skip to content

Commit 2fa17e6

Browse files
committed
Match only the null deprecation, not PHP 8.5's escape deprecation
PHP 8.5 separately deprecates str_getcsv()'s default $escape argument, which fires on every call regardless of this fix. Match the "Passing null" message specifically so the regression test guards only the null query it covers.
1 parent c3a0517 commit 2fa17e6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

framework/core/tests/integration/api/users/ListTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,16 @@ public function email_gambit_only_works_for_admin()
320320
* to a fatal on stricter setups. Regression test for the gambit search
321321
* choking on a null `q`.
322322
*
323-
* The handler only throws for that specific deprecation so it is not
324-
* derailed by unrelated framework deprecations emitted during the request.
323+
* The handler only throws for the "passing null" deprecation so it is not
324+
* derailed by unrelated deprecations emitted during the request — including
325+
* PHP 8.5's separate deprecation of str_getcsv()'s default $escape argument.
325326
*
326327
* @test
327328
*/
328329
public function search_with_null_query_does_not_emit_deprecation()
329330
{
330331
set_error_handler(function ($errno, $errstr) {
331-
if (strpos($errstr, 'str_getcsv') !== false) {
332+
if (strpos($errstr, 'Passing null') !== false) {
332333
throw new \ErrorException($errstr, 0, $errno);
333334
}
334335

0 commit comments

Comments
 (0)