Better handling of empty content
authorMichael <heluecht@pirati.ca>
Fri, 6 Jul 2018 22:08:41 +0000 (22:08 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 6 Jul 2018 22:08:41 +0000 (22:08 +0000)
src/Model/Item.php

index 7c4a3cb..be317b2 100644 (file)
@@ -1832,7 +1832,9 @@ class Item extends BaseObject
                }
 
                if (empty($fields)) {
-                       return;
+                       // when there are no fields at all, just use the condition
+                       // This is to ensure that we always store content.
+                       $fields = $condition;
                }
 
                if (!empty($item['plink'])) {