From: Jonny Tischbein Date: Sat, 17 Nov 2018 15:04:54 +0000 (+0100) Subject: Change how to decide between empty update and not called field file X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=458b0f35459195b5db243e030778b1e685a7d6eb;p=friendica.git Change how to decide between empty update and not called field file --- diff --git a/src/Model/FileTag.php b/src/Model/FileTag.php index 403cbd233e..06040403a9 100644 --- a/src/Model/FileTag.php +++ b/src/Model/FileTag.php @@ -291,9 +291,6 @@ class FileTag } $fields = ['file' => str_replace($pattern, '', $item['file'])]; - if ($fields === '') { - $fields = null; - } Item::update($fields, ['id' => $item_id]); diff --git a/src/Model/Item.php b/src/Model/Item.php index 8e154b0834..9aaac7f7a0 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -832,7 +832,7 @@ class Item extends BaseObject $files = $fields['file']; $fields['file'] = null; } else { - $files = ''; + $files = null; } $delivery_data = ['postopts' => defaults($fields, 'postopts', ''),