From: Ben Klang Date: Fri, 2 Apr 2010 22:34:27 +0000 (-0400) Subject: Shout: One more place to catch empty arrays X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=538efc094f170366ed934de3624038e9c9abaa88;p=horde.git Shout: One more place to catch empty arrays --- diff --git a/shout/lib/Ajax/Application.php b/shout/lib/Ajax/Application.php index 5cecd5f2a..10ed5e75e 100644 --- a/shout/lib/Ajax/Application.php +++ b/shout/lib/Ajax/Application.php @@ -111,7 +111,12 @@ class Shout_Ajax_Application extends Horde_Ajax_Application_Base $vars = $this->_vars; $shout = $GLOBALS['registry']->getApiInstance('shout', 'application'); $account = $_SESSION['shout']['curaccount']['code']; - return $shout->devices->getDevices($account); + $devices = $shout->devices->getDevices($account); + if (empty($devices)) { + return false; + } else { + return $devices; + } } catch (Exception $e) { //FIXME: Create a way to notify the user of the failure. Horde::logMessage($e, 'ERR');