Skip to content

Commit

Permalink
Port to PHP 7.4
Browse files Browse the repository at this point in the history
Prevents the error `array and string offset
access syntax using curly braces is deprecated`.
  • Loading branch information
Martchus committed Nov 30, 2019
1 parent e035069 commit d60109e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions Core/Frameworks/Flake/Core/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ function remove($sKey) {
function &__call($sName, $aArguments) {
if (
strlen($sName) > 7 &&
$sName{0} === "s" &&
$sName{1} === "e" &&
$sName{2} === "t" &&
$sName{3} === "M" &&
$sName{4} === "e" &&
$sName{5} === "t" &&
$sName{6} === "a"
$sName[0] === "s" &&
$sName[1] === "e" &&
$sName[2] === "t" &&
$sName[3] === "M" &&
$sName[4] === "e" &&
$sName[5] === "t" &&
$sName[6] === "a"
) {
$sKey = strtolower(substr($sName, 7, 1)) . substr($sName, 8);
$mValue = & $aArguments[0];
Expand All @@ -194,13 +194,13 @@ function &__call($sName, $aArguments) {

} elseif (
strlen($sName) > 7 &&
$sName{0} === "g" &&
$sName{1} === "e" &&
$sName{2} === "t" &&
$sName{3} === "M" &&
$sName{4} === "e" &&
$sName{5} === "t" &&
$sName{6} === "a"
$sName[0] === "g" &&
$sName[1] === "e" &&
$sName[2] === "t" &&
$sName[3] === "M" &&
$sName[4] === "e" &&
$sName[5] === "t" &&
$sName[6] === "a"
) {
$sKey = strtolower(substr($sName, 7, 1)) . substr($sName, 8);
if (array_key_exists($sKey, $this->aMeta)) {
Expand Down
2 changes: 1 addition & 1 deletion Core/Frameworks/Flake/Util/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static function getRouteClassForRoute($sRoute) {

static function getRouteForController($sController) {

if ($sController{0} !== "\\") {
if ($sController[0] !== "\\") {
$sController = "\\" . $sController;
}

Expand Down

0 comments on commit d60109e

Please sign in to comment.