Skip to content

Commit

Permalink
Added Grav\Common\Media interfaces and trait; use those in Page a…
Browse files Browse the repository at this point in the history
…nd `Media` classes

Added `Grav\Common\Page` interface to allow custom page types in the future
  • Loading branch information
mahagr committed May 4, 2018
1 parent 4d69093 commit 1cfd348
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
* Added new `Grav\Framework\File\Formatter` classes for encoding/decoding YAML, Markdown, JSON, INI and PHP serialized strings
* Added `Grav\Common\Media` interfaces and trait; use those in `Page` and `Media` classes
* Added `Grav\Common\Page` interface to allow custom page types in the future

1. [](#bugfix)
* Fixed bug in `ContentBlock` serialization

# v1.4.4
## 04/12/2018

Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Framework/ContentBlock/ContentBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected function generateId()
*/
protected function checkVersion(array $serialized)
{
$version = isset($serialized['_version']) ? (string) $serialized['_version'] : '1';
$version = isset($serialized['_version']) ? (int) $serialized['_version'] : 1;
if ($version !== $this->version) {
throw new \RuntimeException(sprintf('Unsupported version %s', $version));
}
Expand Down
1 change: 1 addition & 0 deletions system/src/Grav/Framework/ContentBlock/HtmlBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
class HtmlBlock extends ContentBlock implements HtmlBlockInterface
{
protected $version = 1;
protected $frameworks = [];
protected $styles = [];
protected $scripts = [];
Expand Down

0 comments on commit 1cfd348

Please sign in to comment.