-
AuthorPosts
-
December 10, 2014 at 12:02 pm #365914
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 1040http://screencast.com/t/OMlmJwCPMD
ps.I have WPML installed.
please help … thank you
December 10, 2014 at 7:57 pm #366211Hey decode!
Try this out, https://kriesi.at/support/topic/problems-php-5-5-google-map-widget/#post-324190.
Regards,
ElliottDecember 11, 2014 at 3:59 am #366425hi, 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 526I 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);December 11, 2014 at 7:26 am #366529Hey!
Please remove the function then replace the code:
$content = mysqli_real_escape_string($content);with this
$content = esc_sql($content);Regards,
IsmaelDecember 11, 2014 at 5:52 pm #366771hi, 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?
December 11, 2014 at 9:14 pm #366905Hey!
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 -
AuthorPosts
- You must be logged in to reply to this topic.
