projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1dc76d
)
Shout: One more place to catch empty arrays
author
Ben Klang
<ben@alkaloid.net>
Fri, 2 Apr 2010 22:34:27 +0000
(18:34 -0400)
committer
Ben Klang
<ben@alkaloid.net>
Fri, 2 Apr 2010 22:34:27 +0000
(18:34 -0400)
shout/lib/Ajax/Application.php
patch
|
blob
|
history
diff --git
a/shout/lib/Ajax/Application.php
b/shout/lib/Ajax/Application.php
index
5cecd5f
..
10ed5e7
100644
(file)
--- 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');