View Single Post
12-13-2012, 08:23 AM   #1
malcster505
Junior Member
 
Join Date: Mar 2012
Posts: 2
Rep Power: 0
malcster505 is getting browny points
Post Wordpress 3.5 + Vbul Bridge || Comment posting error

Hello, first time poster unfortunately. +1 for this plugin; have been using it for a long while.

After the WP 3.5 update there seems to be an issue with posting comments on posts using the bridge. Every other feature seems to be functioning without issue though.

The error given on posting a comment is as follows:

Fatal error: Call to undefined method stdClass::has_cap() in pathtowordpress\wp-includes\comment.php on line 691

Not sure if anyone else has come across this. I haven't as of yet tried to fix it myself, but if I do find a solution any time soon I'll update my post.

Though if anyone else has an idea of the specific cause I'm open ears as always.

Cheers


Edit: There was a change in the wp_allow_comment function in wp-includes/comments.php
After the do_action

Code:
if ( isset($user_id) && $user_id) {
		$userdata = get_userdata($user_id);
		$user = new WP_User($user_id);
		$post_author = $wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1", $comment_post_ID));
	}
was changed to:

Code:
	if ( ! empty( $user_id ) ) {
		$user = get_userdata( $user_id );
		$post_author = $wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1", $comment_post_ID));
	}
Which is causing the error.

Last edited by malcster505; 12-13-2012 at 08:42 AM.
malcster505 is offline