From 931a37525584890742e0c17e6f3003b8aa7a7297 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Thu, 14 Jul 2011 20:29:10 +0000 Subject: [PATCH] VacationHandler: - check_vacation() used outdated syntax $ah->get() which nowadays only returns true/false. Fixed to fetch $ah->result() and added at least basic error handling. Indirectly ;-) reported by supa_user on IRC git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1075 a1433add-5e2c-0410-b055-b7f2511e0802 --- model/VacationHandler.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/model/VacationHandler.php b/model/VacationHandler.php index cdecc2dd..0b2cdd79 100644 --- a/model/VacationHandler.php +++ b/model/VacationHandler.php @@ -54,7 +54,11 @@ class VacationHandler { */ function check_vacation() { $ah = new AliasHandler($this->username); - $aliases = $ah->get(true); // fetch all. + $success = $ah->get(true); # fetch all. + if (!$success) { + return false; # TODO: error handling? + } + $aliases = $ah->result(); foreach($aliases as $alias) { if($ah->is_vacation_address($alias)) { return true;