Fixed array definition for PHP < 5.4

This commit is contained in:
cytopia 2022-03-18 14:59:29 +01:00
parent 6a98ee4109
commit 218ed79e14
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
2 changed files with 5 additions and 4 deletions

View File

@ -55,13 +55,13 @@ class OpCacheService
'debounce_rate' => 250
];
private function __construct($options = [])
private function __construct($options = array())
{
$this->options = array_merge($this->defaults, $options);
$this->data = $this->compileState();
}
public static function init($options = [])
public static function init($options = array())
{
$self = new self($options);
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH'])
@ -150,7 +150,7 @@ class OpCacheService
$status = opcache_get_status();
$config = opcache_get_configuration();
$files = [];
$files = array();
if (!empty($status['scripts']) && $this->getOption('allow_filelist')) {
uasort($status['scripts'], function($a, $b) {
return $a['hits'] < $b['hits'];
@ -192,7 +192,7 @@ class OpCacheService
]
);
$directives = [];
$directives = array();
ksort($config['directives']);
foreach ($config['directives'] as $k => $v) {
$directives[] = ['k' => $k, 'v' => $v];

View File

@ -10,6 +10,7 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl
#### Fixed
- Fixed pidof issue on QUEMU by replacing it with pgrep #854
- Fixed array definition for PHP < 5.4
#### Added
- Allow to globally enable/disable HTTP/2 [#844](https://github.com/cytopia/devilbox/issues/844)