summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2008-09-09 21:03:22 +0000
committerSeth Mos <seth.mos@xs4all.nl>2008-09-09 21:03:22 +0000
commitb6dd249684e40d63636db99bd0489acec0aa4040 (patch)
treee5e3ab898434c0683b88fd4ea85bf0b5aef261e6 /etc
parent571f89fad5d30d7d549222c840c46aa7f3b691af (diff)
downloadpfsense-b6dd249684e40d63636db99bd0489acec0aa4040.zip
pfsense-b6dd249684e40d63636db99bd0489acec0aa4040.tar.gz
Add validation
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/certs.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc
index f004abf..b4d3dc0 100644
--- a/etc/inc/certs.inc
+++ b/etc/inc/certs.inc
@@ -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;
}
OpenPOWER on IntegriCloud