diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-06-15 22:39:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-15 22:39:56 +0300 |
commit | 33148016a52b6f0006deb70e520492230f0f1880 (patch) | |
tree | 4c9bde3818865310ab2fc495135d51c17ea445a1 | |
parent | 3763024ff9c11c307e09803f10c910a9e9b03a7a (diff) | |
parent | c54fb5f9e616e0a0a5a475a1378cb340d7083780 (diff) |
Merge pull request #32876 from nextcloud/fix/fix-string-interpolation
Use {$var} instead of ${var} for PHP 8.2 compatibility
-rw-r--r-- | apps/dav/lib/DAV/Sharing/Backend.php | 2 | ||||
-rw-r--r-- | apps/files/lib/Command/RepairTree.php | 2 | ||||
-rw-r--r-- | lib/private/L10N/L10N.php | 2 | ||||
-rw-r--r-- | lib/private/Mail/EMailTemplate.php | 2 | ||||
-rw-r--r-- | lib/private/Setup/MySQL.php | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php index 0f675ea4c15..544a38cfbe6 100644 --- a/apps/dav/lib/DAV/Sharing/Backend.php +++ b/apps/dav/lib/DAV/Sharing/Backend.php @@ -201,7 +201,7 @@ class Backend { while ($row = $result->fetch()) { $p = $this->principalBackend->getPrincipalByPath($row['principaluri']); $shares[] = [ - 'href' => "principal:${row['principaluri']}", + 'href' => "principal:{$row['principaluri']}", 'commonName' => isset($p['{DAV:}displayname']) ? $p['{DAV:}displayname'] : '', 'status' => 1, 'readOnly' => (int) $row['access'] === self::ACCESS_READ, diff --git a/apps/files/lib/Command/RepairTree.php b/apps/files/lib/Command/RepairTree.php index 96f114735d6..4fe64ef0edf 100644 --- a/apps/files/lib/Command/RepairTree.php +++ b/apps/files/lib/Command/RepairTree.php @@ -68,7 +68,7 @@ class RepairTree extends Command { ->where($query->expr()->eq('fileid', $query->createParameter('fileid'))); foreach ($rows as $row) { - $output->writeln("Path of file ${row['fileid']} is ${row['path']} but should be ${row['parent_path']}/${row['name']} based on it's parent", OutputInterface::VERBOSITY_VERBOSE); + $output->writeln("Path of file {$row['fileid']} is {$row['path']} but should be {$row['parent_path']}/{$row['name']} based on it's parent", OutputInterface::VERBOSITY_VERBOSE); if ($fix) { $fileId = $this->getFileId((int)$row['parent_storage'], $row['parent_path'] . '/' . $row['name']); diff --git a/lib/private/L10N/L10N.php b/lib/private/L10N/L10N.php index 09c0f1cdb35..82ef3350b1f 100644 --- a/lib/private/L10N/L10N.php +++ b/lib/private/L10N/L10N.php @@ -122,7 +122,7 @@ class L10N implements IL10N { * */ public function n(string $text_singular, string $text_plural, int $count, array $parameters = []): string { - $identifier = "_${text_singular}_::_${text_plural}_"; + $identifier = "_{$text_singular}_::_{$text_plural}_"; if (isset($this->translations[$identifier])) { return (string) new L10NString($this, $identifier, $parameters, $count); } diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index 2c091deb2a1..7ec2b46bad3 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -497,7 +497,7 @@ EOF; */ /** @var string $label */ $label = ($plainMetaInfo !== false)? $plainMetaInfo : ''; - $this->plainBody .= sprintf("%${plainIndent}s %s\n", + $this->plainBody .= sprintf("%{$plainIndent}s %s\n", $label, str_replace("\n", "\n" . str_repeat(' ', $plainIndent + 1), $plainText)); } diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php index 7bd8fa7b1ec..e878ed4d9aa 100644 --- a/lib/private/Setup/MySQL.php +++ b/lib/private/Setup/MySQL.php @@ -80,7 +80,7 @@ class MySQL extends AbstractDatabase { $user = $this->dbUser; //we can't use OC_DB functions here because we need to connect as the administrative user. $characterSet = $this->config->getValue('mysql.utf8mb4', false) ? 'utf8mb4' : 'utf8'; - $query = "CREATE DATABASE IF NOT EXISTS `$name` CHARACTER SET $characterSet COLLATE ${characterSet}_bin;"; + $query = "CREATE DATABASE IF NOT EXISTS `$name` CHARACTER SET $characterSet COLLATE {$characterSet}_bin;"; $connection->executeUpdate($query); } catch (\Exception $ex) { $this->logger->error('Database creation failed.', [ |