From 451e4a05edd8f1a65dde0e32f7d6015c3c20cfcb Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Wed, 15 Dec 2010 17:14:52 -0700 Subject: Fix condition that needed to be negated after a recent layout change here and prevent a PHP warning if there are no voucher rolls. Fixes #1106 --- etc/inc/voucher.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc/inc') diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc index f7cd1d5..ddd8ab4 100644 --- a/etc/inc/voucher.inc +++ b/etc/inc/voucher.inc @@ -248,7 +248,7 @@ function voucher_configure() { /* kill any running minicron */ killbypid("{$g['varrun_path']}/vouchercron.pid"); - if (isset($config['voucher']['enable'])) + if (!isset($config['voucher']['enable'])) return 0; if ($g['booting']) @@ -295,6 +295,7 @@ function voucher_configure() { $a_roll = &$config['voucher']['roll']; $voucherlck = lock('voucher'); + if (is_array($a_roll)) foreach ($a_roll as $rollent) { $roll = $rollent['number']; -- cgit v1.1