WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Dynamic Widgets] Missing Argument Warning

[Plugin: Dynamic Widgets] Missing Argument Warning

  • Hello,

    I installed WordPress 3.5-RC4 on my test site and noticed the following missing argument error:

    Missing argument 2 for wpdb::prepare(), \wp-content\plugins\dynamic-widgets\classes\dynwid_class.php on line 654 and \wp-includes\wp-db.php on line 990.

    I just want to give you a heads-up before 3.5 is officially launched.

    Thanks.

    http://wordpress.org/extend/plugins/dynamic-widgets/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I wound this too. I updated line 990 in wp-db.php.

    function prepare( $query, $args) {

    Becomes

    function prepare( $query, $args = "" ) {

    @brayne, although I believe your solution will work, I think it is better to change the plugin and don’t mess with the WP internal files.

    Changing line 654 in wp-content/plugins/dynamic-widgets/classes/dynwid_class.php from:
    $count = $this->wpdb->get_var($this->wpdb->prepare($query));

    to
    $count = $this->wpdb->get_var($this->wpdb->prepare($query,""));

    also does the trick, but in a nicer way.

    jimkimmons@gmail.com
    Member

    @jimkimmonsgmailcom

    found that line in two places, changed one then both, no help.

    I updated the plugin today to 1.5.4 seems that the issue is fixed in that version.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Dynamic Widgets] Missing Argument Warning’ is closed to new replies.