Skip to content

Commit

Permalink
Wrap variable variables in curly braces
Browse files Browse the repository at this point in the history
See: https://www.php.net/manual/en/language.variables.variable.php

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Sep 27, 2021
1 parent e96b75b commit 9f3b4f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions libraries/classes/DatabaseInterface.php
Expand Up @@ -553,16 +553,16 @@ static function ($a, $b) {
}
}

if (! empty($$sort_by)) {
if (! empty(${$sort_by})) {
if ($sort_order === 'DESC') {
array_multisort($$sort_by, SORT_DESC, $each_tables);
array_multisort(${$sort_by}, SORT_DESC, $each_tables);
} else {
array_multisort($$sort_by, SORT_ASC, $each_tables);
array_multisort(${$sort_by}, SORT_ASC, $each_tables);
}
}

// cleanup the temporary sort array
unset($$sort_by);
unset(${$sort_by});
}

if ($limit_count) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/Git.php
Expand Up @@ -394,7 +394,7 @@ private function extractDataFormTextBody(array $commit): array
$user2['date'] .= $user[4];
}

$$linetype = $user2;
${$linetype} = $user2;
} while ($dataline != '');

$message = trim(implode(' ', $commit));
Expand Down

0 comments on commit 9f3b4f0

Please sign in to comment.