Mark de Scande BlogLines
Member
Posted 5 months ago #
Hello There
I have just upgrade my one of my sites with WordPress 3.5 and i am getting this err
[11-Dec-2012 20:28:09 UTC] PHP Warning: array_search() expects parameter 2 to be array, null given in /home/blogs/public_html/wp-content/db.php on line 250
Please Ron Please let me know what i need to do or just give me some info i can give to the host.
Thank you Kindly
Mark
http://wordpress.org/extend/plugins/shardb/
carmelosantana
Member
Posted 5 months ago #
I know we have bugs related to $wpdb->prepare now requiring the second argument. HyperDB is also having some issues, unsure if its unaware but I've already corrected the $wpdb->prepare bug in a few other plugins already.
Mark de Scande BlogLines
Member
Posted 5 months ago #
That was fast lets hope or good friend Ron gets this sorted strange it is only on my one site ..
BlogLines.co.za is fine
SuperBlogs.co.za is not
carmelosantana
Member
Posted 5 months ago #
If its the same $wpdb::prepare() error, he'll have it patched in no time.
Mark de Scande BlogLines
Member
Posted 5 months ago #
Ok I hope you fix will be available soon :)
Thank you again for helping out
Mark
Mark de Scande BlogLines
Member
Posted 5 months ago #
Cheap fix but it is only a bandage
Edit db.php
<?php
ini_set( "display_errors", 0);
/*
* allow this version to run on 2.9.X
*/
@Ron Please let me know when you have a update
See http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/.
The warning doesn't have anything to do with SharDB (or HyperDB). You have a plugin or theme using prepare without a second parameter.
Greetings,
Indeed this may not be related to the SharDB (or HyperDB) plugin, but it is a provable issue caused directly by the WordPress 3.5 update and needs to be dealt with in any event.
When folks having this issue roll back to WordPress 3.4.2 the issue disappears.
Cheers, Joe
Mark de Scande BlogLines
Member
Posted 5 months ago #
@aecnuorg and @Ron Rennick
You to are to good friends
Well my cheap and dirty fix worked ini_set( "display_errors", 0);
But reading Ron's post link yes there is a bug the bottom line it is a Core WordPress Almost "Bug" Just google it Missing argument 2 for wpdb::prepare() About 52,600 results for the same Almost "BUG"
I am not a "Coder" but this needs to be looked at BIG Please
Thx
Mark
Greetings Mark,
That is nothing, try Googling "wordpress 3.5 broke my site" and you will see 4,990,000 - yes that is four million, nine hundred ninety thousand results.
Now I indeed love WordPress but these types of releases right before Christmas are not good news in any terms of the word.
Cheers, Joe
Mark de Scande BlogLines
Member
Posted 5 months ago #
Yep right before Christmas and it is every year Why dont they just do it in the new year :) when were all fresh and thinking.
Lets hope to see WordPress 3.5.1 soon :)
Greetings,
OK researched more in none panic mode and found "This is caused by a change in WordPress’s functionality to make it more secure."
Indeed - then obviously coders will have to deal with it with updates in their plugs and themes and learn to live with this particular security change.
Cheers, Joe
Please see the troubleshooting master list here:
http://wordpress.org/support/topic/troubleshooting-wordpress-35-master-list?replies=4
These kinds of fixes are rolled in early enough and with enough notices, most premium shops should have an idea they are coming down the line. ;)
Mark de Scande BlogLines
Member
Posted 5 months ago #
@Andrea Rennick Thank you for all the links and cool read :)
Just in case it's been missed -
The warning on the prepare without a second parameter is not a bug and it is not going to be "fixed". You need to search through your plugins and themes to find the instances where prepare is used without a second parameter. In those cases you should change the prepare( to escape(.
Mark de Scande BlogLines
Member
Posted 5 months ago #
Mark de Scande BlogLines
Member
Posted 5 months ago #
@Ron Rennick
The Errs below are on a clean 4096 + 2 DB Set up WordPress 3.5
Do you make head or tails from it.
Thank you Kindly
Mark
[18-Dec-2012 12:29:38 UTC] PHP Warning: mysql_connect() [function.mysql-connect]: Headers and client library minor version mismatch. Headers:50165 Library:50527 in /home/myhbtc/public_html/wp-content/db.php on line 327
[18-Dec-2012 12:29:38 UTC] PHP Warning: array_search() expects parameter 2 to be array, null given in /home/myhbtc/public_html/wp-content/db.php on line 250
[18-Dec-2012 12:29:38 UTC] PHP Warning: array_search() expects parameter 2 to be array, null given in /home/myhbtc/public_html/wp-content/db.php on line 250
Mark de Scande BlogLines
Member
Posted 5 months ago #
I have converted the system over to:
http://premium.wpmudev.org/project/multi-db/
Thank you Kindly
Mark