WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Dynamic Widgets] Missing Argument Warning (5 posts)

  1. jrr1234
    Member
    Posted 1 year ago #

    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/

  2. Brayne
    Member
    Posted 1 year ago #

    I wound this too. I updated line 990 in wp-db.php.

    function prepare( $query, $args) {

    Becomes

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

  3. Triptol
    Member
    Posted 1 year ago #

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

  4. jimkimmons@gmail.com
    Member
    Posted 1 year ago #

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

  5. Triptol
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic