summaryrefslogtreecommitdiffstats
path: root/192.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-10-11 08:03:35 +0200
committerRemi Collet <remi@remirepo.net>2019-10-11 08:03:35 +0200
commit00c0d0b107fa4ffc42d1cbaec2e2feaece2fcaff (patch)
tree271b8ba1455fe5f3c4a9b4f090f66e207aeac8c2 /192.patch
parente461731788a186edc6b3abe3d97101f478bda96b (diff)
- add patches for PHP 7.4 from
https://github.com/zendframework/zend-view/pull/192 https://github.com/zendframework/zend-view/pull/195
Diffstat (limited to '192.patch')
-rw-r--r--192.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/192.patch b/192.patch
new file mode 100644
index 0000000..7385eff
--- /dev/null
+++ b/192.patch
@@ -0,0 +1,28 @@
+From 26679ddafc593e5163df30e98d3ce98b764aa13f Mon Sep 17 00:00:00 2001
+From: webimpress <contact@webimpress.com>
+Date: Tue, 27 Aug 2019 23:29:41 +0100
+Subject: [PATCH] Fix: replace curly offset access brace with square brackets
+
+As of PHP 7.4:
+the array and string offset access syntax using curly braces is deprecated.
+---
+ src/Helper/Navigation/Sitemap.php | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+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)) {