defaultDesign was undefined; fixed that

This commit is contained in:
Evan Prodromou 2010-01-10 14:10:31 -08:00
parent 6fdd52467d
commit 7aa43f3c93
1 changed files with 3 additions and 1 deletions

View File

@ -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);