Simple Dropbox Upload
[resolved] "wpdb::prepare was called incorrectly" on plugin deactivate (3 posts)

  1. spectrus
    Posted 3 years ago #

    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));


  2. spectrus
    Posted 3 years ago #

    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.


  3. hiphopsmurf
    Plugin Author

    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Dropbox Upload
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic