mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-18 03:05:11 +00:00
X509: fix 7.2 error when extensions were removed and new ones added
This commit is contained in:
parent
c8829e7865
commit
8aecafc92f
@ -2530,6 +2530,10 @@ class File_X509
|
|||||||
}
|
}
|
||||||
|
|
||||||
$dn = array_values($dn);
|
$dn = array_values($dn);
|
||||||
|
// fix for https://bugs.php.net/75433 affecting PHP 7.2
|
||||||
|
if (!isset($dn[0])) {
|
||||||
|
$dn = array_splice($dn, 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -4166,6 +4170,10 @@ class File_X509
|
|||||||
}
|
}
|
||||||
|
|
||||||
$extensions = array_values($extensions);
|
$extensions = array_values($extensions);
|
||||||
|
// fix for https://bugs.php.net/75433 affecting PHP 7.2
|
||||||
|
if (!isset($extensions[0])) {
|
||||||
|
$extensions = array_splice($extensions, 0, 0);
|
||||||
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user