Add validation

This commit is contained in:
Seth Mos 2008-09-09 21:03:22 +00:00
parent 571f89fad5
commit b6dd249684

View File

@ -43,10 +43,13 @@ function & lookup_ca($refid) {
function & lookup_cert($refid) {
global $config;
foreach ($config['system']['cert'] as & $cert)
if ($cert['refid'] == $refid)
return $cert;
if(is_array($config['system']['cert'])) {
foreach ($config['system']['cert'] as & $cert) {
if ($cert['refid'] == $refid) {
return $cert;
}
}
}
return false;
}