aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/graph.php
diff options
context:
space:
mode:
authorPim van den Berg2015-06-22 11:23:41 +0200
committerPim van den Berg2015-06-22 11:23:41 +0200
commit50170d143519f672dcd388cd77091c58118ad712 (patch)
treee9a910412d2898ed3ad2a10ef570c3dc58061809 /graph.php
parentjsrrdgraph: Fix typo (diff)
downloadapt-panopticon_cgp-50170d143519f672dcd388cd77091c58118ad712.zip
apt-panopticon_cgp-50170d143519f672dcd388cd77091c58118ad712.tar.gz
apt-panopticon_cgp-50170d143519f672dcd388cd77091c58118ad712.tar.bz2
apt-panopticon_cgp-50170d143519f672dcd388cd77091c58118ad712.tar.xz
graph: only use local json when no json provided by CGP
To prevent from this warning: > array_merge(): Argument #1 is not an array
Diffstat (limited to 'graph.php')
-rw-r--r--graph.php6
1 files changed, 5 insertions, 1 deletions
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'))
51 if (is_null($plugin_json_local)) 51 if (is_null($plugin_json_local))
52 error_log('CGP Error: invalid json in plugin/local/'.$plugin.'.json'); 52 error_log('CGP Error: invalid json in plugin/local/'.$plugin.'.json');
53 53
54 $plugin_json = array_replace_recursive($plugin_json, $plugin_json_local); 54 if (is_array($plugin_json)) {
55 $plugin_json = array_replace_recursive($plugin_json, $plugin_json_local);
56 } else {
57 $plugin_json = $plugin_json_local;
58 }
55 } 59 }
56} 60}
57 61