From 0197e49c295b7830b34ab7a67673d3fb9efa5ad7 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Thu, 20 Oct 2016 14:01:04 -0500 Subject: [PATCH] NerdPack: PHP7 compatibility (unRAID 6.3.0-rc2+) The PHP function `split()` (alias of explode()) was deprecated for a while and was finally removed in php7. Replaced them with explode(). As of unRAID 6.3.0-rc2, PHP was upgraded to version 7.0.x. --- .../local/emhttp/plugins/NerdPack/include/PackageQuery.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/include/PackageQuery.php b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/include/PackageQuery.php index cb88c1c7..dfe393eb 100644 --- a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/include/PackageQuery.php +++ b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/include/PackageQuery.php @@ -47,7 +47,7 @@ foreach ($pkgs_github_array as $pkg_github) { $pkg_set = "no"; foreach ($pkg_cfg as $pkg_key => $pkg_line) { if (preg_match('/^'.$pkg_name.'.*/',$pkg_key)){ - if(sizeof(array_diff(split('-', $pkg_key), split('-', $pkg_name))) < 2 ){ + if(sizeof(array_diff(explode('-', $pkg_key), explode('-', $pkg_name))) < 2 ){ $pkg_set = $pkg_line; break; } @@ -79,4 +79,4 @@ $return = [ ]; echo json_encode($return); -?> \ No newline at end of file +?>