Skip to Content

Chameleon Video Player PHP Warning Fix

|WordPress|0 Comments

I noticed, after updating to the latest WordPress version (4.1), the LambertGroup – Chameleon Video Player plugin produced the error: Warning: Missing argument 2 for wpdb::prepare()
After reading this article:
https://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/
I changed:

$safe_sql=$wpdb->prepare( "SELECT * FROM (".$wpdb->prefix ."lbg2_videosettings) WHERE id = ".$atts['settings_id'] );

to

$settings_id = $atts['settings_id'];
$safe_sql=$wpdb->prepare( "SELECT * FROM (".$wpdb->prefix ."lbg2_videosettings) WHERE id = %d", $settings_id );

(on line:1102 of lbg-chameleon-videoplayer.php).

 

That fixed it. Hope this helps someone out there!

If interested, see more WordPress tutorials.

Related Posts

Share This

Related Tags

no comments yet but open for them

Post a Reply

Your email address will not be published. Required fields are marked *