From a80368e7c22ab6af69ee19870174dfa5f37e7632 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 25 Mar 2013 18:33:06 +0100 Subject: [PATCH] Only check the last JSON error if the function for it exists --- include.config.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include.config.php b/include.config.php index bde3ca9..423acf4 100644 --- a/include.config.php +++ b/include.config.php @@ -20,7 +20,10 @@ if(empty($_CPHP_CONFIG)) $cphp_config = json_decode(file_get_contents($_CPHP_CONFIG)); -if(json_last_error() != JSON_ERROR_NONE) +if(function_exists("json_last_error")) { - die("Failed to parse CPHP configuration. Refer to the CPHP manual for instructions."); + if(json_last_error() != JSON_ERROR_NONE) + { + die("Failed to parse CPHP configuration. Refer to the CPHP manual for instructions."); + } }