mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-11-03 02:48:49 +03:00
Bugfix undefined $aSri
This commit is contained in:
parent
75303886d3
commit
804df33544
1 changed files with 5 additions and 5 deletions
|
|
@ -128,11 +128,11 @@ abstract class Integrity
|
|||
private static $aSri;
|
||||
public static function loadSriHashes(): array
|
||||
{
|
||||
if (!\is_array($aSri)) {
|
||||
if (!\is_array(static::$aSri)) {
|
||||
$sSriPath = APP_VERSION_ROOT_PATH . 'static/sri.json';
|
||||
$aSri = \is_readable($sSriPath) ? \json_decode(\file_get_contents($sSriPath), true) : [];
|
||||
if (!$aSri) {
|
||||
$aSri = [
|
||||
static::$aSri = \is_readable($sSriPath) ? \json_decode(\file_get_contents($sSriPath), true) : [];
|
||||
if (!static::$aSri) {
|
||||
static::$aSri = [
|
||||
'libs.min.js' => \hash_file('sha384', APP_VERSION_ROOT_PATH . 'static/js/min/libs.min.js'),
|
||||
'admin.min.js' => \hash_file('sha384', APP_VERSION_ROOT_PATH . 'static/js/min/admin.min.js'),
|
||||
'app.min.js' => \hash_file('sha384', APP_VERSION_ROOT_PATH . 'static/js/min/app.min.js'),
|
||||
|
|
@ -141,6 +141,6 @@ abstract class Integrity
|
|||
];
|
||||
}
|
||||
}
|
||||
return $aSri;
|
||||
return static::$aSri;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue