Viewing 1 replies (of 1 total)
  • gilgimech

    (@gilgimech)

    The error is being caused by this function on line 1238 in the disqus.php file.

    function dsq_prev_permalink($post_id) {
    // if post not published, return
        $posts = &get_post($post_id);
        if ($posts->post_status != 'publish') {
            return;
        }
        global $dsq_prev_permalinks;
        $dsq_prev_permalinks['post_'.$post_id] = get_permalink($post_id);
    }
    add_action('pre_post_update', 'dsq_prev_permalink');

    The error is cause by the $post variable. It’s trying to return the get_post() function by reference. As of PHP5 you no longer need to do this because it returns a reference automatically.

    If you want to hack the disqus plugin just remove the ‘&’ before the get_post() function. That will get rid of the error.

    Removing it hasn’t caused any errors for me, but you should be warned. Removing it could cause errors that I’m not aware of, and any updates to the plugin will override your changes.

    I’m not sure why it’s there. It’s either just code that hasn’t been updated or disqus is just trying to accommodate older versions of PHP. Then again I may just be way off and there is a reason for it. Again if you are going to hack the plugin there might be unseen consequences.

Viewing 1 replies (of 1 total)
  • The topic ‘Strict Standards: disqus.php on line 1240’ is closed to new replies.