Merge branch 'unstable' of ssh://git.code.sf.net/p/frontaccounting/git into unstable
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 18 Nov 2016 13:30:47 +0000 (14:30 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 18 Nov 2016 13:30:47 +0000 (14:30 +0100)
includes/packages.inc

index 855cb97a92fd1e6ff58950133697df888dd5f5ca..99b620d30eae15a87b8429adbdb47d52cb876f6e 100644 (file)
@@ -730,8 +730,8 @@ function check_src_ext_version($ext_v)
        global $src_version;
 
        $compat_levels = 2;     // current policy is keeping compatibility on major version level.
-       $app = explode('.', strspn($src_version, "0123456789."));
-       $pkg = explode('.', strspn($ext_v, "0123456789."));
+       $app = explode('.', substr($src_version, 0, strspn($src_version, "0123456789.")));
+       $pkg = explode('.', substr($ext_v, 0, strspn($ext_v, "0123456789.")));
 
        for ($i=0; $i < min($compat_levels, count($app)); $i++)
                if ($pkg[$i] < $app[$i])