diff options
| author | Pim van den Berg | 2015-06-22 11:23:41 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2015-06-22 11:23:41 +0200 |
| commit | 50170d143519f672dcd388cd77091c58118ad712 (patch) | |
| tree | e9a910412d2898ed3ad2a10ef570c3dc58061809 | |
| parent | jsrrdgraph: Fix typo (diff) | |
| download | apt-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
| -rw-r--r-- | graph.php | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -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 | ||
