defaultDesign was undefined; fixed that
This commit is contained in:
parent
6fdd52467d
commit
7aa43f3c93
@ -140,12 +140,14 @@ class ApiAction extends Action
|
|||||||
|
|
||||||
// Note: some profiles don't have an associated user
|
// Note: some profiles don't have an associated user
|
||||||
|
|
||||||
|
$defaultDesign = Design::siteDesign();
|
||||||
|
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
$design = $user->getDesign();
|
$design = $user->getDesign();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($design)) {
|
if (empty($design)) {
|
||||||
$design = Design::siteDesign();
|
$design = $defaultDesign;
|
||||||
}
|
}
|
||||||
|
|
||||||
$color = Design::toWebColor(empty($design->backgroundcolor) ? $defaultDesign->backgroundcolor : $design->backgroundcolor);
|
$color = Design::toWebColor(empty($design->backgroundcolor) ? $defaultDesign->backgroundcolor : $design->backgroundcolor);
|
||||||
|
Loading…
Reference in New Issue
Block a user