Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#4716 closed defect (bug) (no action required)

BP Group Reviews Plugin Error After Upgrading Wordpress to 3.5

Reported by: ozgurpolat's profile ozgurpolat Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Core Keywords:
Cc:

Description

Plugin: BP Group Reviews 1.3.1
Wordpress 3.5

I get the following error after upgrading to wordpress 3.5:

"Warning: Missing argument 2 for wpdb::prepare(), called in /home/kooksj5/public_html/kooksjournal.com/wp-content/plugins/bp-group-reviews/bp-group-reviews.php on line 203 and defined in"

I fixed the problem by changing the bp-group-reviews.php.

  1. First change:

Was:

$wpdb->prepare( "SELECT activity_id, meta_value AS rating FROM {$bp->activity->table_name_meta} WHERE activity_id IN ({$activity_ids}) AND meta_key = 'bpgr_rating'" ) );

Is:

"SELECT activity_id, meta_value AS rating FROM {$bp->activity->table_name_meta} WHERE activity_id IN ({$activity_ids}) AND meta_key = 'bpgr_rating'" );

  1. Second change:

was: $wpdb->prepare( "

SELECT m1.group_id, m1.meta_value AS rating, m2.meta_value AS rating_count, m3.meta_value AS ratings_enabled
FROM {$bp->groups->table_name_groupmeta} m1
LEFT JOIN {$bp->groups->table_name_groupmeta} m2 ON (m1.group_id = m2.group_id)
LEFT JOIN {$bp->groups->table_name_groupmeta} m3 ON (m1.group_id = m3.group_id)
WHERE m1.group_id IN ({$group_ids})
AND m1.meta_key = 'bpgr_rating'
AND m2.meta_key = 'bpgr_how_many_ratings'
AND m3.meta_key = 'bpgr_is_reviewable'"

) );

is:

"

SELECT m1.group_id, m1.meta_value AS rating, m2.meta_value AS rating_count, m3.meta_value AS ratings_enabled
FROM {$bp->groups->table_name_groupmeta} m1
LEFT JOIN {$bp->groups->table_name_groupmeta} m2 ON (m1.group_id = m2.group_id)
LEFT JOIN {$bp->groups->table_name_groupmeta} m3 ON (m1.group_id = m3.group_id)
WHERE m1.group_id IN ({$group_ids})
AND m1.meta_key = 'bpgr_rating'
AND m2.meta_key = 'bpgr_how_many_ratings'
AND m3.meta_key = 'bpgr_is_reviewable'"

) ;

Change History (2)

#1 @ozgurpolat
11 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#2 @DJPaul
11 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.