AndyB
Well-known member
My add-on called Robots v1.5 works very well, but one admin receives the following error once in a while:
Here's the structure of the xf_robots table:
The SQL query to insert the user_agent data is this:
I assume I need to use some PHP code to clean the $userAgent variable, what should I use?
Thank you.
Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Incorrect string value: '\xA3\xA9' for column 'user_agent' at row 1 - library/Zend/Db/Statement/Mysqli.php:214
Here's the structure of the xf_robots table:
The SQL query to insert the user_agent data is this:
PHP:
// run query
$db->query("
INSERT INTO xf_robots
(ip, user_agent, type, view_date)
VALUES
(?,?,?,?)
", array($ip, $userAgent, $type, $timestamp));
I assume I need to use some PHP code to clean the $userAgent variable, what should I use?
Thank you.
Last edited: