mirror of
https://github.com/friendica/friendica
synced 2025-04-25 02:30:11 +00:00
Replace deprecated calls to defaults() by ?? and ?: in src/
This commit is contained in:
parent
c0b78a9720
commit
146646c4d4
41 changed files with 239 additions and 233 deletions
|
@ -421,7 +421,7 @@ class DBStructure
|
|||
}
|
||||
|
||||
if (isset($database[$name]["table_status"]["Comment"])) {
|
||||
$structurecomment = defaults($structure, "comment", "");
|
||||
$structurecomment = $structure["comment"] ?? '';
|
||||
if ($database[$name]["table_status"]["Comment"] != $structurecomment) {
|
||||
$sql2 = "COMMENT = '" . DBA::escape($structurecomment) . "'";
|
||||
|
||||
|
@ -465,7 +465,7 @@ class DBStructure
|
|||
// Compare the field structure field by field
|
||||
foreach ($structure["fields"] AS $fieldname => $parameters) {
|
||||
// Compare the field definition
|
||||
$field_definition = defaults($database[$name]["fields"], $fieldname, ['Collation' => '']);
|
||||
$field_definition = ($database[$name]["fields"][$fieldname] ?? '') ?: ['Collation' => ''];
|
||||
|
||||
// Define the default collation if not given
|
||||
if (!isset($parameters['Collation']) && !empty($field_definition['Collation'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue