Browse Source
Use {$var} instead of ${var} for PHP 8.2 compatibility
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/32876/head
Côme Chilliet
3 years ago
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
5 changed files with
5 additions and
5 deletions
apps/dav/lib/DAV/Sharing/Backend.php
apps/files/lib/Command/RepairTree.php
lib/private/L10N/L10N.php
lib/private/Mail/EMailTemplate.php
lib/private/Setup/MySQL.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 ,
@ -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' ]);
@ -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 );
}
@ -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 ));
}
@ -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.' , [