X509: fix 7.2 error when extensions were removed and new ones added

This commit is contained in:
terrafrost 2018-01-21 12:23:47 -06:00
parent c8829e7865
commit 8aecafc92f

View File

@ -2530,6 +2530,10 @@ class File_X509
}
$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);
// fix for https://bugs.php.net/75433 affecting PHP 7.2
if (!isset($extensions[0])) {
$extensions = array_splice($extensions, 0, 0);
}
return $result;
}