Forums

Error, (2 posts)

  1. justinfm101
    Member
    Posted 3 years ago #

    Maybe this only happens in 2.7, but I got an error using this theme to begin with. The error I got was on the blog and it said...

    Fatal error: Only variables can be passed by reference and then the url to the functions.php with line 412 referenced.

    I fixed it by replacing the code starting on line 408 that looks like this...

    // comment count
    	add_filter('get_comments_number', 'comment_count', 0);
    	function comment_count($count) {
    		global $id;
    		$comments_by_type = &separate_comments(get_comments('post_id=' . $id));
    		return count($comments_by_type['comment']);
    	}

    With...

    // comment count
    	add_filter('get_comments_number', 'comment_count', 0);
    	function comment_count( $commentcount ) {
    		global $id;
    		$_commnets = get_comments('post_id=' . $id);
    		$comments_by_type = &separate_comments($_commnets);
    		return count($comments_by_type['comment']);
    	}

    I pulled this code from one of the programmers other themes.

  2. mg12
    Member
    Posted 3 years ago #

    Hi, justinfm101
    Thanks for your report.
    The bug have fixed in the new versions.

Topic Closed

This topic has been closed to new replies.

About this Topic