From: Evan Prodromou Date: Sun, 10 Jan 2010 22:10:31 +0000 (-0800) Subject: defaultDesign was undefined; fixed that X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7aa43f3c93a5434b59a66824b2816d5ba8cf1978;p=quix0rs-gnu-social.git defaultDesign was undefined; fixed that --- diff --git a/lib/api.php b/lib/api.php index 4ed49e4529..06d7c079d2 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);