com web/master: use square brackets for string offset access: scripts/rss_parser
| From: | Peter Cowburn | Date: | Mon, 29 Jun 2020 14:10:19 +0000 |
| Subject: | com web/master: use square brackets for string offset access: scripts/rss_parser | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-28690@lists.php.net to get a copy of this message | ||
Commit: f17c55f1cbd4ed5e089fddbcd96d88a86d59161a
Author: Peter Cowburn <salathe@php.net> Mon, 29 Jun 2020 15:10:19 +0100
Parents: fc7ab27cda68f6e1d803dc25ac6b30d8b472969e
Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=f17c55f1cbd4ed5e089fddbcd96d88a86d59161a
Log:
use square brackets for string offset access
Changed paths:
M scripts/rss_parser
Diff:
diff --git a/scripts/rss_parser b/scripts/rss_parser
index 3f572d8..a8624a7 100644
--- a/scripts/rss_parser
+++ b/scripts/rss_parser
@@ -35,7 +35,7 @@ function scanLinks($text, $rootLink) {
// Make sure it is a full URL
if (!preg_match('/^http:/', $link)) {
$rootLink = rtrim($rootLink, "/");
- $link = ($link{0} != '/') ? "$rootLink/$link" :
"$rootLink$link";
+ $link = ($link[0] != '/') ? "$rootLink/$link" :
"$rootLink$link";
}
return $link;