diff options
author | Ermal <eri@pfsense.org> | 2014-11-01 18:49:45 +0100 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2014-11-01 18:49:45 +0100 |
commit | d338018f4798ea41975589f8c5b111568747e572 (patch) | |
tree | ad9402692aee28d63359bae966576bfce55ae0c1 | |
parent | d35dfaaecb5eabedade43738ba4f76967a7425a3 (diff) | |
download | pfsense-d338018f4798ea41975589f8c5b111568747e572.zip pfsense-d338018f4798ea41975589f8c5b111568747e572.tar.gz |
Fixes #3938. Do more error checking.
-rw-r--r-- | etc/inc/captiveportal.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index a5029a5..e2cc203 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -1323,8 +1323,10 @@ function captiveportal_read_db($query = "") { $DB = captiveportal_opendb(); if ($DB) { $response = $DB->query("SELECT * FROM captiveportal {$query}"); - while ($row = $response->fetchArray()) - $cpdb[] = $row; + if ($response != FALSE) { + while ($row = $response->fetchArray()) + $cpdb[] = $row; + } $DB->close(); } |