update php7 compatibility

This commit is contained in:
dmacias72
2016-10-20 13:24:56 -06:00
parent 0072c016c5
commit 8c1e4f5449
4 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,4 @@
<?php
<?
// Download a file from given url
function get_file_from_url($file, $url) {
$chfile = fopen($file, 'w');

View File

@ -1,4 +1,4 @@
<?php
<?
require_once '/usr/local/emhttp/plugins/NerdPack/include/NerdPackHelpers.php';
require_once '/usr/local/emhttp/plugins/NerdPack/include/DownloadHelpers.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;
}