diff options
author | Mario <mario@mariovavti.com> | 2022-10-20 13:16:03 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-10-20 13:16:03 +0000 |
commit | bf434818d7cfac6bf29482d4bb07fc567de2fc90 (patch) | |
tree | fc50a3cafce38134d758767caec1ffea8da8fdcf /include | |
parent | 03aeb888322e792ccb17593761f1f93ad2906c7e (diff) | |
download | volse-hubzilla-bf434818d7cfac6bf29482d4bb07fc567de2fc90.tar.gz volse-hubzilla-bf434818d7cfac6bf29482d4bb07fc567de2fc90.tar.bz2 volse-hubzilla-bf434818d7cfac6bf29482d4bb07fc567de2fc90.zip |
fix php warnings
Diffstat (limited to 'include')
-rw-r--r-- | include/conversation.php | 10 | ||||
-rw-r--r-- | include/items.php | 1 | ||||
-rw-r--r-- | include/text.php | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/conversation.php b/include/conversation.php index 2b00c12be..bb0603eca 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1328,7 +1328,7 @@ function hz_status_editor($a, $x, $popup = false) { if(x($x, 'hide_future')) $feature_future = false; - $geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : ''); + $geotag = ((isset($x['allow_location']) && $x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : ''); $setloc = t('Set your location'); $clearloc = ((get_pconfig($x['profile_uid'], 'system', 'use_browser_location')) ? t('Clear browser location') : ''); if(x($x, 'hide_location')) @@ -1491,10 +1491,10 @@ function hz_status_editor($a, $x, $popup = false) { '$content' => ((x($x,'body')) ? htmlspecialchars($x['body'], ENT_COMPAT,'UTF-8') : ''), '$attachment' => ((x($x, 'attachment')) ? $x['attachment'] : ''), '$post_id' => ((x($x, 'post_id')) ? $x['post_id'] : ''), - '$defloc' => $x['default_location'], + '$defloc' => $x['default_location'] ?? '', '$visitor' => $x['visitor'], - '$lockstate' => $x['lockstate'], - '$acl' => $x['acl'], + '$lockstate' => $x['lockstate'] ?? '', + '$acl' => $x['acl'] ?? '', '$allow_cid' => acl2json($x['permissions']['allow_cid']), '$allow_gid' => acl2json($x['permissions']['allow_gid']), '$deny_cid' => acl2json($x['permissions']['deny_cid']), @@ -1502,7 +1502,7 @@ function hz_status_editor($a, $x, $popup = false) { '$mimeselect' => $mimeselect, '$layoutselect' => $layoutselect, '$showacl' => ((array_key_exists('showacl', $x)) ? $x['showacl'] : true), - '$bang' => $x['bang'], + '$bang' => $x['bang'] ?? '', '$profile_uid' => $x['profile_uid'], '$preview' => $preview, '$source' => ((x($x, 'source')) ? $x['source'] : ''), diff --git a/include/items.php b/include/items.php index 8a244db2f..a01a0e2fa 100644 --- a/include/items.php +++ b/include/items.php @@ -2409,6 +2409,7 @@ function send_status_notifications($post_id,$item) { $parent = 0; $is_reaction = false; + $thr_parent_id = 0; $type = ((intval($item['item_private']) === 2) ? NOTIFY_MAIL : NOTIFY_COMMENT); diff --git a/include/text.php b/include/text.php index 37d185ce6..220844fd1 100644 --- a/include/text.php +++ b/include/text.php @@ -3977,7 +3977,7 @@ function new_token($minlen = 36, $maxlen = 48) { $len = (($minlen === $maxlen) ? $minlen : mt_rand($minlen, $maxlen)); for ($a = 0; $a < $len; $a++) { - $str .= $chars[mt_rand(0, 62)]; + $str .= $chars[mt_rand(0, 61)]; } return $str; |