Mingle Forum plugin returning a Warning message
-
I keep getting this warning message above my Mingle Forum content:
Warning: Missing argument 2 for wpdb::prepare(), called in /home/watson13/public_html/home/wp-content/plugins/mingle-forum/wpf.class.php on line 405 and defined in /home/watson13/public_html/home/wp-includes/wp-db.php on line 1147
I went to the file and line specified, but I have no idea how to fix it. Here is the code from both files on the lines specified:
line 405 segment:
function get_paged_threadlink($id, $postid = ''){ global $wpdb; $wpdb->query($wpdb->prepare("SELECT * FROM $this->t_posts WHERE parent_id = $id")); $num = ceil($wpdb->num_rows / $this->options['forum_posts_per_page']) - 1; if($num < 0) $num = 0; if($this->options['forum_use_seo_friendly_urls']) { $group = $this->get_seo_friendly_title($this->get_groupname($this->get_parent_id(FORUM, $this->get_parent_id(THREAD, $id)))."-group".$this->get_parent_id(FORUM, $this->get_parent_id(THREAD, $id))); $forum = $this->get_seo_friendly_title($this->get_forumname($this->get_parent_id(THREAD, $id))."-forum".$this->get_parent_id(THREAD, $id)); $thread = $this->get_seo_friendly_title($this->get_subject($id)."-thread".$id); return rtrim($this->home_url, '/').'/'.$group.'/'.$forum.'/'.$thread.".".$num.$postid; } else return $this->thread_link.$id.".".$num.$postid; }
line 1147 segment:
function prepare( $query, $args ) { if ( is_null( $query ) ) return; // This is not meant to be foolproof -- but it will catch obviously incorrect usage. if ( strpos( $query, '%' ) === false ) { _doing_it_wrong( 'wpdb::prepare', sprintf( __( 'The query argument of %s must have a placeholder.' ), 'wpdb::prepare()' ), '3.9' ); }
Any help is very much appreciated!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Mingle Forum plugin returning a Warning message’ is closed to new replies.