hi, I am getting this error when trying to click on the post category widget:
Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/bouncin6/public_html/gladwave/wp-includes/wp-db.php on line 1040
http://screencast.com/t/OMlmJwCPMD
ps.I have WPML installed.
please help … thank you
Hey decode!
Try this out, https://kriesi.at/support/topic/problems-php-5-5-google-map-widget/#post-324190.
Regards,
Elliott
hi, Elliott
I tried adding the code to functions.php, but I got this error and the site became unavailable.
Parse error: syntax error, unexpected T_NS_SEPARATOR, expecting ‘)’ in /home/bouncin6/public_html/gladwave/wp-content/themes/enfold/functions.php on line 526
I am not sure about the instruction,
I added this code to functions.php,
if(!function_exists('mysql_real_escape_string_alt')) {
function mysql_real_escape_string_alt($value)
{
global $avia_config;
$search = array("\\", "\x00", "\n", "\r", "'", '"', "\x1a");
$replace = array("\\\\","\","\\n", "\\r", "\'", '\"', "\\Z");
return str_replace($search, $replace, $value);
}
}
and then I was lost, I don’t know which line to be replaced with
$content = mysql_real_escape_string_alt($content);
Hey!
Please remove the function then replace the code:
$content = mysqli_real_escape_string($content);
with this
$content = esc_sql($content);
Regards,
Ismael
hi, Ismael
I don’t think there is such line of code in my functions.php, I am using the latest enfold file.
am I missing anything?
Hey!
It should be around line 1322 in /enfold/framework/php/class-framework-widgets.php.
$content = mysql_real_escape_string($content);
Try changing it to this like Ismael suggested.
$content = esc_sql($content);
Cheers!
Elliott