mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-10-31 21:33:00 +00:00
Add error detection to peppermint.json loader
This commit is contained in:
parent
37c6273623
commit
961ac2c89c
1 changed files with 6 additions and 0 deletions
|
@ -33,6 +33,12 @@ if(!file_exists("peppermint.json"))
|
|||
else
|
||||
$settings = json_decode(file_get_contents("peppermint.json"));
|
||||
|
||||
if($settings === null)
|
||||
{
|
||||
header("content-type: text/plain");
|
||||
exit("Error: Failed to decode the settings file! Does it contain a syntax error?");
|
||||
}
|
||||
|
||||
if($settings->css === "auto")
|
||||
{
|
||||
$settings->css = <<<THEMECSS
|
||||
|
|
Loading…
Reference in a new issue