mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Set default content to "" (empty string), not null, in PhrictionDocumentEditor
Summary: phriction.edit allows you to omit the content string, meaning "don't edit content". If you're also creating the page, we currently break in a terrible, horrible, no-good, very-bad way because 'content' can't be null. Default to empty string instead so phriction.edit creates an empty page instead of a broken mess. Test Plan: Called phriction.edit on a new page with no content. Reviewers: skrul, jungejason, nh, tuomaspelkonen, aran Reviewed By: skrul CC: aran, skrul Differential Revision: 920
This commit is contained in:
parent
bd778b4c8e
commit
0366936d4c
1 changed files with 1 additions and 0 deletions
|
@ -53,6 +53,7 @@ final class PhrictionDocumentEditor {
|
||||||
$content = new PhrictionContent();
|
$content = new PhrictionContent();
|
||||||
$content->setSlug($slug);
|
$content->setSlug($slug);
|
||||||
$content->setTitle($default_title);
|
$content->setTitle($default_title);
|
||||||
|
$content->setContent('');
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj = new PhrictionDocumentEditor();
|
$obj = new PhrictionDocumentEditor();
|
||||||
|
|
Loading…
Reference in a new issue