From c6ba8c79609aaf6bd85c2b8765bc1629b5f0db72 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 21 Mar 2023 19:56:21 +0100 Subject: [PATCH] Fix curly brace when accessing character inside string --- src/phorkie/Repository.php | 2 +- src/phorkie/Repository/Remote.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phorkie/Repository.php b/src/phorkie/Repository.php index eae2fb4..fab32a1 100644 --- a/src/phorkie/Repository.php +++ b/src/phorkie/Repository.php @@ -210,7 +210,7 @@ class Repository ->execute(); $files = explode("\n", trim($output)); foreach ($files as &$file) { - if ($file{0} == '"') { + if ($file[0] == '"') { $file = $this->decodeFileName($file); } } diff --git a/src/phorkie/Repository/Remote.php b/src/phorkie/Repository/Remote.php index 3bb153f..e46d3a9 100644 --- a/src/phorkie/Repository/Remote.php +++ b/src/phorkie/Repository/Remote.php @@ -73,7 +73,7 @@ class Repository_Remote public function isLocal() { return isset($this->arConfig['url']) - && $this->arConfig['url']{0} == '/'; + && $this->arConfig['url'][0] == '/'; } /** -- 2.30.2