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