summaryrefslogtreecommitdiff
path: root/lib/api.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-10 14:10:31 -0800
committerEvan Prodromou <evan@status.net>2010-01-10 14:10:31 -0800
commit7aa43f3c93a5434b59a66824b2816d5ba8cf1978 (patch)
treed589a9c26c53bd69cf140e9abf923b366ec63496 /lib/api.php
parent6fdd52467dea6164d71afc9b80e1f8bcf5fb1b9a (diff)
defaultDesign was undefined; fixed that
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api.php b/lib/api.php
index 4ed49e452..06d7c079d 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -140,12 +140,14 @@ class ApiAction extends Action
// Note: some profiles don't have an associated user
+ $defaultDesign = Design::siteDesign();
+
if (!empty($user)) {
$design = $user->getDesign();
}
if (empty($design)) {
- $design = Design::siteDesign();
+ $design = $defaultDesign;
}
$color = Design::toWebColor(empty($design->backgroundcolor) ? $defaultDesign->backgroundcolor : $design->backgroundcolor);