mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-23 05:01:13 +01:00
Fix a fatal for 404s in Phriction
Summary: Fixes T7817. Not all documents have `$content`, so don't try to set a timestamp if there's no content. An example is `/w/asdlkfnalskdnfaslk/`, i.e. the 404 document. Test Plan: Hit `/w/junk/` and got a nice 404 instead of a fatal. Reviewers: chad, btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T7817 Differential Revision: https://secure.phabricator.com/D12401
This commit is contained in:
parent
dd22db18ff
commit
281bdf87cf
1 changed files with 6 additions and 2 deletions
|
@ -35,6 +35,7 @@ final class PhrictionDocumentController
|
||||||
$core_content = '';
|
$core_content = '';
|
||||||
$move_notice = '';
|
$move_notice = '';
|
||||||
$properties = null;
|
$properties = null;
|
||||||
|
$content = null;
|
||||||
|
|
||||||
if (!$document) {
|
if (!$document) {
|
||||||
|
|
||||||
|
@ -194,8 +195,11 @@ final class PhrictionDocumentController
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setUser($user)
|
->setUser($user)
|
||||||
->setPolicyObject($document)
|
->setPolicyObject($document)
|
||||||
->setHeader($page_title)
|
->setHeader($page_title);
|
||||||
->setEpoch($content->getDateCreated());
|
|
||||||
|
if ($content) {
|
||||||
|
$header->setEpoch($content->getDateCreated());
|
||||||
|
}
|
||||||
|
|
||||||
$prop_list = null;
|
$prop_list = null;
|
||||||
if ($properties) {
|
if ($properties) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue