From c65c3a5d54d060578dc785a8d83c170693836210 Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 18 Dec 2012 09:48:02 +0000 Subject: If there is no roll do not try to save anything --- etc/inc/voucher.inc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'etc') diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc index 094b829..3356a1a 100644 --- a/etc/inc/voucher.inc +++ b/etc/inc/voucher.inc @@ -670,6 +670,9 @@ function voucher_save_db_to_config_zone() { if (!isset($config['voucher'][$cpzone]['enable'])) return; // no vouchers or don't want to save DB's + if (!is_array($config['voucher'][$cpzone]['roll'])) + return; + $voucherlck = lock("voucher{$cpzone}", LOCK_EX); // walk all active rolls and save runtime DB's to flash -- cgit v1.1