Skip to Content

Chameleon Video Player PHP Warning Fix

| Wordpress

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: I changed:

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


$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.

Share This