WordPress.org

Support

Support » Plugins and Hacks » [Resolved] "wpdb::prepare was called incorrectly" on plugin deactivate

[Resolved] "wpdb::prepare was called incorrectly" on plugin deactivate

  • Hi, here’s the notice in its entirety.

    PHP Notice:  wpdb::prepare was called incorrectly. wpdb::prepare() requires at least two arguments.
    
    PHP Stack trace:
    
    ...
    
    PHP   6. wpsdbFunction->removeSettingsGroup() [...]\wp-content\plugins\simple-dropbox-upload-form\wp-dropbox.php:873
    
    PHP   7. wpdb->prepare() [...]\wp-content\plugins\simple-dropbox-upload-form\inc\wpsdbClass.php:34

    To fix you can change line 34 in wpsdbFunction:removeSettingsGroup() from this:

    $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->options WHERE option_id = '".$wpsdb_delete_settings[$t]->option_id."'"));

    to this:

    $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->options WHERE option_id = %d", $wpsdb_delete_settings[$t]->option_id));

    http://wordpress.org/extend/plugins/simple-dropbox-upload-form/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Also, it would be great to see the code posted to GitHub. This way it would be much easier for the community to contribute to well-being of this wonderful plugin.

    Thanks!

    Plugin Author hiphopsmurf
    Member

    @hiphopsmurf

    I will be sure to add the fix to the next update. Thank you for that 🙂 GitHub will likely be in this plugins’ future.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] "wpdb::prepare was called incorrectly" on plugin deactivate’ is closed to new replies.