Repleace deprecated curved brackets (#607)

This commit is contained in:
Alexander Dmitryuk 2019-12-27 11:52:10 +07:00 committed by Ayesh Karunaratne
parent 9a34c57d8f
commit a38f509ee1
No known key found for this signature in database
GPG Key ID: 2CA18B2097A7429A

View File

@ -37,7 +37,7 @@ $arOptions = array();
$arArgs = array(); $arArgs = array();
array_shift($argv);//script itself array_shift($argv);//script itself
foreach ($argv as $arg) { foreach ($argv as $arg) {
if ($arg{0} == '-') { if ($arg[0] == '-') {
$arOptions[$arg] = true; $arOptions[$arg] = true;
} else { } else {
$arArgs[] = $arg; $arArgs[] = $arg;
@ -95,7 +95,7 @@ function getUrlFromPath($path)
//already an URL //already an URL
return $path; return $path;
} }
if ($path{0} == '/') { if ($path[0] == '/') {
//absolute path //absolute path
return 'file://' . $path; return 'file://' . $path;
} }
@ -200,7 +200,7 @@ if ($pathSchema === null) {
exit(6); exit(6);
} }
} }
if ($pathSchema{0} == '/') { if ($pathSchema[0] == '/') {
$pathSchema = 'file://' . $pathSchema; $pathSchema = 'file://' . $pathSchema;
} }