Skip to content

Commit

Permalink
Fixed namespace reference for Grav Page, throwing errors for PHP < 7
Browse files Browse the repository at this point in the history
  • Loading branch information
w00fz committed Jan 14, 2017
1 parent d2369d1 commit 71fe40c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 5.4.4.
## XX/XX/2017

1. [Grav](#grav)
3. [](#bugfix)
- Fixed namespace reference for Grav Page, throwing errors for PHP < 7

# 5.4.3
## 13/01/2017

Expand Down
6 changes: 3 additions & 3 deletions src/platforms/grav/classes/Gantry/Framework/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Gantry\Component\Menu\AbstractMenu;
use Gantry\Component\Menu\Item;
use Grav\Common\Grav;
use Grav\Common\Page\Page;
use Grav\Common\Page\Page as GravPage;
use Grav\Common\Uri;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;

Expand Down Expand Up @@ -87,7 +87,7 @@ public function getGroupedItems()
$groups['mainmenu'] = array();

// Build the options array.
/** @var Page $page */
/** @var GravPage $page */
foreach ($pages as $page) {
$name = trim($page->route(), '/') ?: $this->default;
$path = explode('/', $name);
Expand Down Expand Up @@ -171,7 +171,7 @@ protected function getItemsFromPlatform($levels)
// Return flat list of routes.
$list = [];
$this->pages = [];
/** @var Page $item */
/** @var GravPage $item */
foreach ($pages as $item) {
$level = substr_count($item->route(), '/');

Expand Down

1 comment on commit 71fe40c

@mahagr
Copy link
Member

@mahagr mahagr commented on 71fe40c Jan 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @w00fz, it's really hard to remember what is supported by which PHP version.

Please sign in to comment.