Error reported during wordpress 3.5 upgrade

Source: Internet
Author: User

I successfully upgraded version 3.5 a few days ago, but I haven't seen it for the past few days. Today I suddenly see the following error: Missing argument 2 for wpdb: prepare () search for the solution and find footer in the directory of your current topic. php, edit it and find the following line of code: $ post_datetimes = $ wpdb-> get_row ($ wpdb-> prepare ("select year (min (post_date_gmt) AS firstyear, YEAR (max (post_date_gmt) AS lastyear FROM $ wpdb-> posts WHERE post_date_gmt> 1970 "); replace: $ post_datetimes = $ wpdb-> get_row ($ wpdb-> prepare ("select year (min (post_date_gmt) AS firs Tyear, YEAR (max (post_date_gmt) AS lastyear FROM $ wpdb-> posts WHERE post_date_gmt> 1970 "," "); Warning: Missing argument 2 for wpdb: prepare () when you see this information, you will surely think that an error occurred during the update process. However, please note that: this has nothing to do with your updates and the topics you are currently using! This is a security change made in version 3.5 to avoid security issues caused by SQL injection!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.