php 8.1 Deprecated null parameters in functions. Fixed.
authorJoe <joe.hunt.consulting@gmail.com>
Mon, 6 Jun 2022 08:43:06 +0000 (10:43 +0200)
committerJoe <joe.hunt.consulting@gmail.com>
Mon, 6 Jun 2022 08:43:06 +0000 (10:43 +0200)
includes/packages.inc

index 54d16abf5b4bf31cd15ff29f8b048a6acd0b9c94..87febb332e0fd63202de1cc7dc2736dc686775ad 100644 (file)
@@ -708,9 +708,13 @@ function install_extension($pkg_name)
 */
 function check_pkg_upgrade($current, $available)
 {
+       if ($available == NULL)
+               return false;
        preg_match_all('/[\d]+/', $available, $aver);
        if (!count($aver[0]))
                return false;
+       if ($current == NULL)
+               return true;
        preg_match_all('/[\d]+/', $current, $cver);
        if (!count($cver[0]))
                return true;