Merge pull request #10881 from creative-commoners/pulls/4.13/double-assignement

MNT Tidy up double assignment
This commit is contained in:
Guy Sartorelli 2023-07-21 09:36:04 +12:00 committed by GitHub
commit c2a30d9b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -396,7 +396,7 @@ abstract class DBSchemaManager
// Create custom fields
if ($fieldSchema) {
foreach ($fieldSchema as $fieldName => $fieldSpec) {
$fieldSpec = $fieldSpec ??= '';
$fieldSpec ??= '';
// convert Enum short array syntax to long array syntax to make parsing $arrayValue below easier
$fieldSpec = preg_replace('/^(enum\()\[(.*?)\]/i', '$1array($2)', $fieldSpec);
//Is this an array field?