]> git.mxchange.org Git - friendica.git/commitdiff
Change how to decide between empty update and not called field file
authorJonny Tischbein <jonny_tischbein@systemli.org>
Sat, 17 Nov 2018 15:04:54 +0000 (16:04 +0100)
committerJonny Tischbein <jonny_tischbein@systemli.org>
Sat, 17 Nov 2018 15:04:54 +0000 (16:04 +0100)
src/Model/FileTag.php
src/Model/Item.php

index 403cbd233e52d3ad0824693ca7899f16d474c99a..06040403a95101dce550baf2310aa6d79aa8dd08 100644 (file)
@@ -291,9 +291,6 @@ class FileTag
         }
 
         $fields = ['file' => str_replace($pattern, '', $item['file'])];
-        if ($fields === '') {
-               $fields = null;
-        }
 
         Item::update($fields, ['id' => $item_id]);
 
index 8e154b0834fce888863a5145ed6085b69ac771c3..9aaac7f7a0ce0a59a2ca514a5a59ade9a5b50b86 100644 (file)
@@ -832,7 +832,7 @@ class Item extends BaseObject
                        $files = $fields['file'];
                        $fields['file'] = null;
                } else {
-                       $files = '';
+                       $files = null;
                }
 
                $delivery_data = ['postopts' => defaults($fields, 'postopts', ''),