From 50170d143519f672dcd388cd77091c58118ad712 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 22 Jun 2015 11:23:41 +0200 Subject: graph: only use local json when no json provided by CGP To prevent from this warning: > array_merge(): Argument #1 is not an array --- graph.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'graph.php') diff --git a/graph.php b/graph.php index d4242ea..fc1eb83 100644 --- a/graph.php +++ b/graph.php @@ -51,7 +51,11 @@ if(function_exists('json_decode')) if (is_null($plugin_json_local)) error_log('CGP Error: invalid json in plugin/local/'.$plugin.'.json'); - $plugin_json = array_replace_recursive($plugin_json, $plugin_json_local); + if (is_array($plugin_json)) { + $plugin_json = array_replace_recursive($plugin_json, $plugin_json_local); + } else { + $plugin_json = $plugin_json_local; + } } } -- cgit v1.1