mirror of
https://github.com/processwire/processwire.git
synced 2025-08-15 03:05:26 +02:00
Fix issue processwire/processwire-issues#979
This commit is contained in:
@@ -1062,6 +1062,9 @@ class Fields extends WireSaveableItems {
|
|||||||
if($fieldtype) {
|
if($fieldtype) {
|
||||||
// ask fieldtype what is compatible
|
// ask fieldtype what is compatible
|
||||||
$fieldtypes = $fieldtype->getCompatibleFieldtypes($field);
|
$fieldtypes = $fieldtype->getCompatibleFieldtypes($field);
|
||||||
|
if(!$fieldtypes || !$fieldtypes instanceof WireArray) {
|
||||||
|
$fieldtypes = $this->wire(new Fieldtypes());
|
||||||
|
}
|
||||||
// ensure original is present
|
// ensure original is present
|
||||||
$fieldtypes->prepend($fieldtype);
|
$fieldtypes->prepend($fieldtype);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user