Skip to content

Commit 13cfebf

Browse files
committed
add missing variable
1 parent 4a1ff08 commit 13cfebf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/ExpressionLanguageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,14 @@ public function testNullSafeEvaluateFails($expression, $foo, $message)
311311
/**
312312
* @dataProvider provideInvalidNullSafe
313313
*/
314-
public function testNullSafeCompileFails($expression)
314+
public function testNullSafeCompileFails($expression, $foo)
315315
{
316316
$expressionLanguage = new ExpressionLanguage();
317317

318318
$this->expectException(\ErrorException::class);
319319

320320
set_error_handler(static function (int $errno, string $errstr, string $errfile = null, int $errline = null): bool {
321-
if ($errno & (\E_WARNING | \E_USER_WARNING)) {
321+
if ($errno & (\E_WARNING | \E_USER_WARNING) && (str_contains($errstr, 'Attempt to read property') || str_contains($errstr, 'Trying to access'))) {
322322
throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
323323
}
324324

0 commit comments

Comments
 (0)