Browse Source

$board can be NULL here, prevent indexing it

Simplest 7.4 fix ever? Possibly.
pull/68/head
Daniel Saunders 3 years ago
committed by discomrade
parent
commit
b0b30ad755
  1. 20
      inc/functions.php

20
inc/functions.php

@ -212,15 +212,17 @@ function loadConfig() {
if (!isset($config['image_deleted']))
$config['image_deleted'] = $config['dir']['static'] . 'deleted.png';
if (!isset($config['uri_thumb']))
$config['uri_thumb'] = $config['root'] . $board['dir'] . $config['dir']['thumb'];
elseif (isset($board['dir']))
$config['uri_thumb'] = sprintf($config['uri_thumb'], $board['dir']);
if (!isset($config['uri_img']))
$config['uri_img'] = $config['root'] . $board['dir'] . $config['dir']['img'];
elseif (isset($board['dir']))
$config['uri_img'] = sprintf($config['uri_img'], $board['dir']);
if (isset($board)) {
if (!isset($config['uri_thumb']))
$config['uri_thumb'] = $config['root'] . $board['dir'] . $config['dir']['thumb'];
elseif (isset($board['dir']))
$config['uri_thumb'] = sprintf($config['uri_thumb'], $board['dir']);
if (!isset($config['uri_img']))
$config['uri_img'] = $config['root'] . $board['dir'] . $config['dir']['img'];
elseif (isset($board['dir']))
$config['uri_img'] = sprintf($config['uri_img'], $board['dir']);
}
if (!isset($config['uri_stylesheets']))
$config['uri_stylesheets'] = $config['root'] . 'stylesheets/';

Loading…
Cancel
Save