]> git.mxchange.org Git - friendica.git/blobdiff - mod/smilies.php
Merge pull request #6737 from MrPetovan/bug/6630-fix-empty-label-profile
[friendica.git] / mod / smilies.php
index 1c0a1bbd769e2415a739aa2aafe9e542a6282639..bbb7de2e2efac4f2ad8807789f522b28d12dc204 100644 (file)
@@ -7,13 +7,14 @@ use Friendica\Content\Smilies;
 use Friendica\Core\System;
 
 /**
- * @param object $a App
+ * @param App $a App
  * @return string
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
  */
 function smilies_content(App $a)
 {
        $smilies = Smilies::getList();
-       if ($a->argv[1] === "json") {
+       if (!empty($a->argv[1]) && ($a->argv[1] === "json")) {
                $results = [];
                for ($i = 0; $i < count($smilies['texts']); $i++) {
                        $results[] = ['text' => $smilies['texts'][$i], 'icon' => $smilies['icons'][$i]];