]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #6028 from annando/issue-5913
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 26 Oct 2018 04:32:16 +0000 (00:32 -0400)
committerGitHub <noreply@github.com>
Fri, 26 Oct 2018 04:32:16 +0000 (00:32 -0400)
Issue 5913: Fix fatal error in "RemoveUser"

1  2 
src/Model/Item.php

diff --combined src/Model/Item.php
index 77828273bc7f27b159665194ad97ccdeb147c69d,a39093d78546303ffd156babc22e2e13fd511845..e7358a776e8412b0a9f2be4c712e43ddb136ae0c
@@@ -816,7 -816,7 +816,7 @@@ class Item extends BaseObjec
                        $tags = $fields['tag'];
                        $fields['tag'] = null;
                } else {
 -                      $tags = '';
 +                      $tags = null;
                }
  
                if (array_key_exists('file', $fields)) {
                                }
                        }
  
 -                      if (!empty($tags)) {
 +                      if (!is_null($tags)) {
                                Term::insertFromTagFieldByItemId($item['id'], $tags);
                                if (!empty($item['tag'])) {
                                        DBA::update('item', ['tag' => ''], ['id' => $item['id']]);
         *
         * @return boolean success
         */
-       private static function deleteById($item_id, $priority = PRIORITY_HIGH)
+       public static function deleteById($item_id, $priority = PRIORITY_HIGH)
        {
                // locate item to be deleted
                $fields = ['id', 'uri', 'uid', 'parent', 'parent-uri', 'origin',