mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 18:22:41 +01:00
Use the default skin if a blog has a set but no-longer-available skin
Summary: I set one of my blogs to "phacility.com" based on `arc patch` and it now fatals since that's not a valid class anymore. :P Recover from these cases. Test Plan: Viewed blog, no missing symbole exception. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T1373 Differential Revision: https://secure.phabricator.com/D3692
This commit is contained in:
parent
8355f3592f
commit
304599eab0
1 changed files with 8 additions and 2 deletions
|
@ -53,9 +53,15 @@ final class PhameBlog extends PhameDAO {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSkinRenderer() {
|
public function getSkinRenderer() {
|
||||||
$skin = $this->getSkin();
|
try {
|
||||||
|
$skin = newv($this->getSkin(), array());
|
||||||
|
} catch (PhutilMissingSymbolException $ex) {
|
||||||
|
// If this blog has a skin but it's no longer available (for example,
|
||||||
|
// it was uninstalled) just return the default skin.
|
||||||
|
$skin = newv(self::SKIN_DEFAULT, array());
|
||||||
|
}
|
||||||
|
|
||||||
return new $skin();
|
return $skin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue