diff options
author | jim-p <jimp@pfsense.org> | 2011-05-13 09:45:25 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-05-13 09:45:25 -0400 |
commit | 60c5d29b5f0bdd272368e8651abdb15fafea6f03 (patch) | |
tree | 4f84505c7ca90dbef0373e506eaabfbd8a3ffb44 /etc | |
parent | 042578fd634f8c54a158417527d018e0f8f56b95 (diff) | |
download | pfsense-60c5d29b5f0bdd272368e8651abdb15fafea6f03.zip pfsense-60c5d29b5f0bdd272368e8651abdb15fafea6f03.tar.gz |
Test for array before using variable as one.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/voucher.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc index d5c040b..ec59716 100644 --- a/etc/inc/voucher.inc +++ b/etc/inc/voucher.inc @@ -129,7 +129,7 @@ EOF; log_error("CaptivePortalVoucherSync XMLRPC reload data success with {$url}:{$port} (pfsense.exec_php)."); } $toreturn = XML_RPC_Decode($resp->value()); - if(count($toreturn['voucher']['roll']) <> count($config['voucher']['roll'])) { + if (is_array($toreturn['voucher']) && (count($toreturn['voucher']['roll']) <> count($config['voucher']['roll']))) { $config['voucher']['roll'] = $toreturn['voucher']['roll']; write_config("Captive Portal Voucher database synchronized with {$url}"); voucher_configure(true); |