]> git.mxchange.org Git - friendica.git/blobdiff - mod/wall_attach.php
Merge pull request #6312 from annando/check-json
[friendica.git] / mod / wall_attach.php
index b4254ba64adfc683d3392725f65d77a320530384..ba1a8205c589a8b98a6f2329fb208d75f5a7ee36 100644 (file)
@@ -15,7 +15,7 @@ use Friendica\Util\Strings;
 
 function wall_attach_post(App $a) {
 
-       $r_json = (x($_GET,'response') && $_GET['response']=='json');
+       $r_json = (!empty($_GET['response']) && $_GET['response']=='json');
 
        if ($a->argc > 1) {
                $nick = $a->argv[1];
@@ -85,7 +85,7 @@ function wall_attach_post(App $a) {
                killme();
        }
 
-       if (! x($_FILES,'userfile')) {
+       if (empty($_FILES['userfile'])) {
                if ($r_json) {
                        echo json_encode(['error' => L10n::t('Invalid request.')]);
                }
@@ -120,7 +120,7 @@ function wall_attach_post(App $a) {
                if ($r_json) {
                        echo json_encode(['error' => $msg]);
                } else {
-                       echo $msg . EOL ;
+                       echo $msg . EOL;
                }
                @unlink($src);
                killme();
@@ -144,7 +144,7 @@ function wall_attach_post(App $a) {
                if ($r_json) {
                        echo json_encode(['error' => $msg]);
                } else {
-                       echo $msg . EOL ;
+                       echo $msg . EOL;
                }
                killme();
        }
@@ -160,7 +160,7 @@ function wall_attach_post(App $a) {
                if ($r_json) {
                        echo json_encode(['error' => $msg]);
                } else {
-                       echo $msg . EOL ;
+                       echo $msg . EOL;
                }
                killme();
        }