1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 01:24:05 +01:00

$board can be NULL here, prevent indexing it

Simplest 7.4 fix ever? Possibly.
This commit is contained in:
Daniel Saunders 2020-01-19 01:06:01 -05:00 committed by Fredrick Brennan
parent 5e809047ad
commit c7e5cd6814

View File

@ -225,15 +225,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($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_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/';