jrr1234
Member
Posted 5 months 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/
Brayne
Member
Posted 5 months ago #
I wound this too. I updated line 990 in wp-db.php.
function prepare( $query, $args) {
Becomes
function prepare( $query, $args = "" ) {
Triptol
Member
Posted 5 months 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.
jimkimmons@gmail.com
Member
Posted 5 months ago #
found that line in two places, changed one then both, no help.
Triptol
Member
Posted 5 months ago #
I updated the plugin today to 1.5.4 seems that the issue is fixed in that version.