• I have this warning: “Should be only variables passed by reference in” which the online search results in: public_html / remedionaturales.com / wp-content / themes / point / functions.php on line 369
    Now there I have this I do not know where to put my hand:
     

    add_filter ('get_comments_number' 'mts_comment_count', 0);
    mts_comment_count function ($ count) {
         if (! is_admin ()) {
             global $ id;
           (line 369) $ comments_by_type = & separate_comments (get_comments ('status = approve & post_id =', $ id));
             return count ($ comments_by_type ['comment']);
         } Else {
             return $ count;
         }
    }

    Anyone can tell me how to solve this? I get this message right in the pages of entries.

    Thank you.

    [Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Have you made any to the theme at all?

    I want to say part of it could be this particular line:


    $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));

    Part of that is because it is fairly old PHP code being used:

    As of PHP 5.3.0, you will get a warning saying that “call-time pass-by-reference” is deprecated when you use & in foo(&$a);. And as of PHP 5.4.0, call-time pass-by-reference was removed, so using it will raise a fatal error.

    If you haven’t already, try contacting the theme’s author about it.

    Thread Starter Rsanahuano

    (@rsanahuano)

    Good day, fine and might be wrong, in this case if you know it’s bad for being very old, What is the solution? At least if you know where evil, you know what to do. Please, what do I do?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Should be only variables passed by reference in’ is closed to new replies.