mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/16648] Fix possible Access to undeclared static property error in tests
PHPBB3-16648
This commit is contained in:
parent
5a55891d06
commit
ee3a3ef5fa
1 changed files with 10 additions and 2 deletions
|
@ -81,12 +81,20 @@ class phpbb_test_case_helpers
|
||||||
{
|
{
|
||||||
case E_NOTICE:
|
case E_NOTICE:
|
||||||
case E_STRICT:
|
case E_STRICT:
|
||||||
|
// The static property was removed from PHPUnit since v.8.3.0
|
||||||
|
if (isset(PHPUnit\Framework\Error\Notice::$enabled))
|
||||||
|
{
|
||||||
PHPUnit\Framework\Error\Notice::$enabled = true;
|
PHPUnit\Framework\Error\Notice::$enabled = true;
|
||||||
|
}
|
||||||
$exceptionName = 'PHPUnit\Framework\Error\Notice';
|
$exceptionName = 'PHPUnit\Framework\Error\Notice';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_WARNING:
|
case E_WARNING:
|
||||||
|
// The static property was removed from PHPUnit since v.8.3.0
|
||||||
|
if (isset(PHPUnit\Framework\Error\Warning::$enabled))
|
||||||
|
{
|
||||||
PHPUnit\Framework\Error\Warning::$enabled = true;
|
PHPUnit\Framework\Error\Warning::$enabled = true;
|
||||||
|
}
|
||||||
$exceptionName = 'PHPUnit\Framework\Error\Warning';
|
$exceptionName = 'PHPUnit\Framework\Error\Warning';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue