Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 4 voices.

Last updated by Bruno 7 years, 3 months ago.

Assigned support staff: Bruno.

Author Posts
August 1, 2013 at 1:47 pm #150964

Baden

The upcoming version of WordPress (3.6) has deprecated the use of $wpdb->escape that your plugins use extensively.
This causes the following error:
Notice: wpdb::escape is deprecated since version 3.6! Use wpdb::prepare() or esc_sql() instead.

More info here:
http://wordpress.org/support/topic/wordpress-36-rc2-last-minute-wpdbescape-deprecation-is-not-nice

August 1, 2013 at 2:14 pm #150972

Bruno

Dear Baden,

This is not a error, it's a 'notice'. This means that in the future this method 'escape' will be removed, but for now it will continue working. Our developers are looking for new functions of WP and the functions that are depredated.

To make this notice does not appear, just change the lines in the file wp-config.php:

define ('WP_DEBUG', false);

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Thank you.

August 13, 2013 at 6:32 pm #154482

its@adventist.ca

Any idea as to when the fix for this will be available? I need debugging on in my development site, and these errors are messing me up.

Thanks.

August 14, 2013 at 12:26 pm #154737

Fee

same here. turning off debug in testing mode should never be a serious answer...

Fastest way for the developers would be to search for '$wpdb->escape' and replace it with 'esc_sql' - but sure a deeper look is needed. I did a search through the source files. In some places the '$wpdb->escape' is used inside of SQL strings (wrapped in {}).

Thanks in advance..

August 14, 2013 at 5:53 pm #154848

Baden

Bruno. You are correct, it's a notice. But this little 'notice' renders the ability to use sub-domains for languages useless. In this way it is, in fact, an error. Thank you for your suggestion of turning off the debug mode, that was very valuable information. Hey, I have a light on in my car that says 'check engine soon'. Using your logic, the problem has been solved by removing the lightbulb. Huzzah!

In the mean time, we fixed it. For those looking for an actual solution, here is a stop-gap solution while we wait for WPML:....

August 14, 2013 at 7:46 pm #154861

Bruno

Dear Fee,

As I mentioned in the post above, this will be fixed. Maybe a workaround is to use:

//not show depreciated.
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

The next version is under development and will soon be launched.

Please, soon you will be contacted. If I can help with anything else, let me know.

Thank you.

The topic ‘[Closed] $wpdb->escape is deprecated since version 3.6’ is closed to new replies.