1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 17:54:44 +02:00
This commit is contained in:
Ryan Cramer
2019-09-27 11:41:50 -04:00
parent 7bbf1a53b2
commit 869c6f4a60

View File

@@ -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 {