PHP Strict Standards: Only variables should be assigned by reference

Here’s the code in question. It started looking like this:

$comments_by_type = &separate_comments(get_comments(‘status=approve&post_id=’ . $id)); return count($comments_by_type[‘comment’]);

I removed the & signs per other posts I have seen but it didn’t help.
$comments_by_type = separate_comments(get_comments(‘status=approve post_id=’ . $id)); return count($comments_by_type[‘comment’]);

Read more here:: PHP Strict Standards: Only variables should be assigned by reference

Leave a Reply

Your email address will not be published. Required fields are marked *