]> git.mxchange.org Git - friendica.git/commitdiff
Apply suggestions from code review
authorMichael Vogel <icarus@dabo.de>
Sun, 7 Nov 2021 12:57:24 +0000 (13:57 +0100)
committerGitHub <noreply@github.com>
Sun, 7 Nov 2021 12:57:24 +0000 (13:57 +0100)
Co-authored-by: Philipp <admin+Github@philipp.info>
mod/photos.php
mod/tagger.php

index 6cfdd6a998a558bb611704c350fdcc58eebf5270..b4ffb756c160248b58cb47a8057610a8963cb828 100644 (file)
@@ -204,7 +204,7 @@ function photos_post(App $a)
                }
 
                // RENAME photo album
-               $newalbum = trim($_POST['albumname']);
+               $newalbum = trim($_POST['albumname'] ?? '');
                if ($newalbum != $album) {
                        Photo::update(['album' => $newalbum], ['album' => $album, 'uid' => $page_owner_uid]);
                        // Update the photo albums cache
index 4afe6efb67a9115b9c0714bc3f464eaa0e460284..d55e34f78bd1d2dfa1f68ade73b5d6c939d07e00 100644 (file)
@@ -41,7 +41,7 @@ function tagger_content(App $a) {
                return;
        }
 
-       $term = trim($_GET['term']);
+       $term = trim($_GET['term'] ?? '');
        // no commas allowed
        $term = str_replace([',',' ', '<', '>'],['','_', '', ''], $term);