Skip to content

Commit

Permalink
more guards in style.ini handling
Browse files Browse the repository at this point in the history
Theoretically these keys should always be set, but it seems under some
conditions/templates/setups they aren't.

closes #3648
  • Loading branch information
splitbrain committed May 12, 2022
1 parent f4b4490 commit 4daaaa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/StyleUtils.php
Expand Up @@ -99,7 +99,7 @@ public function cssStyleini()
if (file_exists($inifile)) {
$config = parse_ini_file($inifile, true);

if (is_array($config['stylesheets'])) {
if (isset($config['stylesheets']) && is_array($config['stylesheets'])) {
foreach ($config['stylesheets'] as $inifile => $mode) {
// validate and include style files
$stylesheets = array_merge(
Expand All @@ -110,7 +110,7 @@ public function cssStyleini()
}
}

if (is_array($config['replacements'])) {
if (isset($config['replacements']) && is_array($config['replacements'])) {
$replacements = array_replace(
$replacements,
$this->cssFixreplacementurls($config['replacements'], $webbase)
Expand Down

0 comments on commit 4daaaa1

Please sign in to comment.