mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 15:33:23 +01:00
fix an other substr(): Passing null to parameter #1 ($string) of type string is deprecated
This commit is contained in:
parent
6e1de33a23
commit
e4acb0eac1
@ -451,17 +451,18 @@ class setup
|
||||
* Return X.X.X major version from X.X.X.X versionstring
|
||||
*
|
||||
* @param string $versionstring
|
||||
* @return string major version or '' for !$versionstring, e.g. for null
|
||||
*/
|
||||
function get_major($versionstring)
|
||||
{
|
||||
if(!$versionstring)
|
||||
{
|
||||
return False;
|
||||
return '';
|
||||
}
|
||||
|
||||
$version = str_replace('pre','.',$versionstring);
|
||||
$varray = explode('.',$version);
|
||||
$major = implode('.',array($varray[0],$varray[1],$varray[2]));
|
||||
$version = str_replace('pre','.', $versionstring);
|
||||
$varray = explode('.', $version);
|
||||
$major = implode('.', array_slice($varray, 0, 3));
|
||||
|
||||
return $major;
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ class setup_detection
|
||||
|
||||
foreach($depvalue['versions'] as $depsvalue)
|
||||
{
|
||||
$currentver = $setup_info[$depvalue['appname']]['currentver'];
|
||||
$currentver = $setup_info[$depvalue['appname']]['currentver'] ?? '';
|
||||
if ($depvalue['appname'] == 'phpgwapi' && substr($currentver,0,6) == '0.9.99')
|
||||
{
|
||||
$currentver = '0.9.14.508';
|
||||
|
Loading…
Reference in New Issue
Block a user