mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #10881 from creative-commoners/pulls/4.13/double-assignement
MNT Tidy up double assignment
This commit is contained in:
commit
c2a30d9b3b
@ -396,7 +396,7 @@ abstract class DBSchemaManager
|
|||||||
// Create custom fields
|
// Create custom fields
|
||||||
if ($fieldSchema) {
|
if ($fieldSchema) {
|
||||||
foreach ($fieldSchema as $fieldName => $fieldSpec) {
|
foreach ($fieldSchema as $fieldName => $fieldSpec) {
|
||||||
$fieldSpec = $fieldSpec ??= '';
|
$fieldSpec ??= '';
|
||||||
// convert Enum short array syntax to long array syntax to make parsing $arrayValue below easier
|
// convert Enum short array syntax to long array syntax to make parsing $arrayValue below easier
|
||||||
$fieldSpec = preg_replace('/^(enum\()\[(.*?)\]/i', '$1array($2)', $fieldSpec);
|
$fieldSpec = preg_replace('/^(enum\()\[(.*?)\]/i', '$1array($2)', $fieldSpec);
|
||||||
//Is this an array field?
|
//Is this an array field?
|
||||||
|
Loading…
Reference in New Issue
Block a user