mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-01-22 18:28:26 +00:00
address PHP 8.5 deprecation
This commit is contained in:
parent
c6343be01b
commit
6f778eeec3
1 changed files with 6 additions and 1 deletions
|
|
@ -155,7 +155,12 @@ class ControllerTest extends TestCase
|
|||
{
|
||||
$newConfig = new class extends Configuration {};
|
||||
$configValue = (new ReflectionClass(Controller::class))->getProperty('_conf');
|
||||
$configValue->setAccessible(true);
|
||||
if (version_compare(PHP_VERSION, '8.1') < 0) {
|
||||
// > This function has been DEPRECATED as of PHP 8.5.0. [...]
|
||||
// > As of PHP 8.1.0, calling this method has no effect; all properties are accessible by default.
|
||||
// @see: https://www.php.net/manual/en/reflectionproperty.setaccessible.php
|
||||
$configValue->setAccessible(true);
|
||||
}
|
||||
ob_start();
|
||||
$controller = new Controller($newConfig);
|
||||
ob_end_clean();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue