Skip to content

Commit

Permalink
Don't allow null to be set as Page content
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jul 27, 2018
1 parent c9367ba commit 8ee367e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
1. [](#bugfix)
* Fix for modular page preview [#2066](https://github.com/getgrav/grav/issues/2066)
* `Page::routeCanonical()` should be string not array [#2069](https://github.com/getgrav/grav/issues/2069)
* Don't allow `null` to be set as Page content

# v1.4.6
## 06/20/2018
Expand Down
2 changes: 2 additions & 0 deletions system/src/Grav/Common/Page/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,8 @@ public function getRawContent()
*/
public function setRawContent($content)
{
$content = $content === null ? '': $content;

$this->content = $content;
}

Expand Down

0 comments on commit 8ee367e

Please sign in to comment.