aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-12 19:36:24 +0000
committerMario <mario@mariovavti.com>2022-10-12 19:36:24 +0000
commit71efb0565803018cb1ba362706c763714c596cf7 (patch)
tree508827af55db42365892e6064f0e009e5068567e /include/items.php
parenta9a36894cb2637b546ed566ee06f20511cce031f (diff)
downloadvolse-hubzilla-71efb0565803018cb1ba362706c763714c596cf7.tar.gz
volse-hubzilla-71efb0565803018cb1ba362706c763714c596cf7.tar.bz2
volse-hubzilla-71efb0565803018cb1ba362706c763714c596cf7.zip
fix php warnings
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/items.php b/include/items.php
index be3c83f7d..bf81cf56d 100644
--- a/include/items.php
+++ b/include/items.php
@@ -2966,18 +2966,20 @@ function tgroup_check($uid, $item) {
if(! $u)
return false;
-
- $terms = array_merge(get_terms_oftype($item['term'],TERM_MENTION),get_terms_oftype($item['term'],TERM_FORUM));
-
- if($terms)
- logger('tgroup_check: post mentions: ' . print_r($terms,true), LOGGER_DATA);
-
$max_forums = get_config('system','max_tagged_forums',2);
$matched_forums = 0;
$link = normalise_link($u[0]['xchan_url']);
+ $terms = [];
+
+ if (isset($item['terms']) && $item['terms']) {
+ $terms = array_merge(get_terms_oftype($item['term'],TERM_MENTION),get_terms_oftype($item['term'],TERM_FORUM));
+ }
+
if($terms) {
+ logger('tgroup_check: post mentions: ' . print_r($terms,true), LOGGER_DATA);
+
foreach($terms as $term) {
if(! link_compare($term['url'],$link)) {
continue;
@@ -4715,7 +4717,7 @@ function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow,
foreach($linkified as $x) {
$access_tag = $x['success']['access_tag'];
if(($access_tag) && (! $parent_item)) {
- logger('access_tag: ' . $tag . ' ' . print_r($access_tag,true), LOGGER_DATA);
+ logger('access_tag: ' . print_r($access_tag,true), LOGGER_DATA);
if ($first_access_tag && (! get_pconfig($profile_uid,'system','no_private_mention_acl_override'))) {
// This is a tough call, hence configurable. The issue is that one can type in a @!privacy mention