Skip to content

Commit ebad568

Browse files
committed
Fix nightly
- Fix closed resources - Skip PHP8 or later - Fix deprecated features in PHP 7.2.0 - see https://www.php.net/manual/en/function.set-error-handler.php
1 parent acdcd5c commit ebad568

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/Util/PHP/Template/TestCaseMethod.tpl.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ if ('' !== $configurationFilePath) {
7878
unset($configuration);
7979
}
8080

81-
function __phpunit_error_handler($errno, $errstr, $errfile, $errline, $errcontext)
81+
function __phpunit_error_handler($errno, $errstr, $errfile, $errline, $errcontext = null)
8282
{
8383
return true;
8484
}

tests/Framework/ConstraintTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,9 @@ public function testConstraintIsResourceTypeEvaluatesCorrectlyWithResources($res
13771377

13781378
$this->assertTrue($constraint->evaluate($resource, '', true));
13791379

1380-
@fclose($resource);
1380+
if (is_resource($resource)) {
1381+
fclose($resource);
1382+
}
13811383
}
13821384

13831385
/**

tests/Regression/Trac/578.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
--TEST--
22
#578: Double printing of trace line for exceptions from notices and warnings
3+
--SKIPIF--
4+
<?php
5+
if (PHP_VERSION_ID >= 80000) die('Skipped: Error message changed in PHP8 or later'); ?>
36
--FILE--
47
<?php
58
$_SERVER['argv'][1] = '--no-configuration';

0 commit comments

Comments
 (0)