diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ebbaeab..ca3fadb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,9 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed -- Nothing. +- [#192](https://github.com/zendframework/zend-view/pull/192) changes + curly braces in array and string offset access to square brackets + in order to prevent issues under the upcoming PHP 7.4 release. ## 2.11.2 - 2019-02-19 diff --git a/src/Helper/Navigation/Sitemap.php b/src/Helper/Navigation/Sitemap.php index 76acb227..08aa922e 100644 --- a/src/Helper/Navigation/Sitemap.php +++ b/src/Helper/Navigation/Sitemap.php @@ -267,10 +267,10 @@ public function url(AbstractPage $page) { $href = $page->getHref(); - if (! isset($href{0})) { + if (! isset($href[0])) { // no href return ''; - } elseif ($href{0} == '/') { + } elseif ($href[0] == '/') { // href is relative to root; use serverUrl helper $url = $this->getServerUrl() . $href; } elseif (preg_match('/^[a-z]+:/im', (string) $href)) {