diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-04-24 15:41:35 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-04-24 15:41:35 +0200 |
commit | 2ea87b65ca4aeab08e68a4e5cd1fd940ae470146 (patch) | |
tree | d5e5cb38640ecdcb95dc76b6a6bc842821d5f811 | |
parent | a6c42e875633e8e67bbf93425182cce4de3eb653 (diff) | |
download | volse-hubzilla-2ea87b65ca4aeab08e68a4e5cd1fd940ae470146.tar.gz volse-hubzilla-2ea87b65ca4aeab08e68a4e5cd1fd940ae470146.tar.bz2 volse-hubzilla-2ea87b65ca4aeab08e68a4e5cd1fd940ae470146.zip |
fix php warnings
-rw-r--r-- | Zotlabs/Module/Photos.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index fa22c3f26..a143c4d4c 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -1148,10 +1148,10 @@ class Photos extends \Zotlabs\Web\Controller { builtin_activity_puller($item, $conv_responses); } - $like_count = ((x($alike,$link_item['mid'])) ? $alike[$link_item['mid']] : ''); $like_list = ((x($alike,$link_item['mid'])) ? $alike[$link_item['mid'] . '-l'] : ''); - if (count($like_list) > MAX_LIKERS) { + + if(is_array($like_list) && (count($like_list) > MAX_LIKERS)) { $like_list_part = array_slice($like_list, 0, MAX_LIKERS); array_push($like_list_part, '<a href="#" data-toggle="modal" data-target="#likeModal-' . $this->get_id() . '"><b>' . t('View all') . '</b></a>'); } else { @@ -1163,7 +1163,7 @@ class Photos extends \Zotlabs\Web\Controller { $dislike_count = ((x($dlike,$link_item['mid'])) ? $dlike[$link_item['mid']] : ''); $dislike_list = ((x($dlike,$link_item['mid'])) ? $dlike[$link_item['mid'] . '-l'] : ''); $dislike_button_label = tt('Dislike','Dislikes',$dislike_count,'noun'); - if (count($dislike_list) > MAX_LIKERS) { + if (is_array($dislike_list) && (count($dislike_list) > MAX_LIKERS)) { $dislike_list_part = array_slice($dislike_list, 0, MAX_LIKERS); array_push($dislike_list_part, '<a href="#" data-toggle="modal" data-target="#dislikeModal-' . $this->get_id() . '"><b>' . t('View all') . '</b></a>'); } else { |