diff options
author | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2019-09-03 17:08:33 +0000 |
---|---|---|
committer | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2019-09-03 17:08:33 +0000 |
commit | 915e9ce783d79738dad2423d9e84e1ba939998c2 (patch) | |
tree | 8e890df0af23d6b3c241f770ffffb800b3203ef4 /scripts/feeds.php | |
parent | 6a386606fb6216dfcf5825d0b0d88d5d13305c11 (diff) | |
download | pmwiki.svn-915e9ce783d79738dad2423d9e84e1ba939998c2.tar.bz2 |
Update for PHP 7.4 string offset with curly braces is deprecated
git-svn-id: svn://pmwiki.org/pmwiki/trunk@3514 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'scripts/feeds.php')
-rw-r--r-- | scripts/feeds.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/feeds.php b/scripts/feeds.php index d9d6a7b3..67b43c3b 100644 --- a/scripts/feeds.php +++ b/scripts/feeds.php @@ -1,5 +1,5 @@ <?php if (!defined('PmWiki')) exit(); -/* Copyright 2005-2015 Patrick R. Michaud (pmichaud@pobox.com) +/* Copyright 2005-2019 Patrick R. Michaud (pmichaud@pobox.com) This file is part of PmWiki; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -218,10 +218,10 @@ function HandleFeed($pagename, $auth = 'read') { # format feed elements foreach($f['feed'] as $k => $v) { - if ($k{0} == '_' || !$v) continue; + if ($k[0] == '_' || !$v) continue; $x = FmtPageName($v, $pagename); if (!$x) continue; - $out .= ($v{0} == '<') ? $x : "<$k>$x</$k>\n"; + $out .= ($v[0] == '<') ? $x : "<$k>$x</$k>\n"; } # format items in feed @@ -235,7 +235,7 @@ function HandleFeed($pagename, $auth = 'read') { $out .= FmtPageName($f['item']['_start'], $pn); foreach((array)@$f['item'] as $k => $v) { - if ($k{0} == '_' || !$v) continue; + if ($k[0] == '_' || !$v) continue; if (is_callable($v)) { $out .= $v($pn, $page, $k); continue; } if (strpos($v, '$LastModifiedBy') !== false && !@$page['author']) continue; @@ -251,7 +251,7 @@ function HandleFeed($pagename, $auth = 'read') { } $x = FmtPageName($v, $pn); if (!$x) continue; - $out .= ($v{0} == '<') ? $x : "<$k>$x</$k>\n"; + $out .= ($v[0] == '<') ? $x : "<$k>$x</$k>\n"; } $out .= FmtPageName($f['item']['_end'], $pn); } |