Active
Project:
OpenCalais
Version:
6.x-3.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Nov 2010 at 17:45 UTC
Updated:
16 Feb 2011 at 14:20 UTC
I'm using the manual tag modifier with Open Calais Semantic Proxy. When I click the Tag with Calais tab, a warning is given.
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /home/MY_SITE/public_html/MY_SUB_DIRECTORY/includes/database.mysqli.inc on line 323.
I modified the code in database.mysqli.inc to look at what is being passed in the $text variable.
/**
* Prepare user input for use in a database query, preventing SQL injection attacks.
*/
function db_escape_string($text) {
global $active_db;
if (gettype($text) != 'string') {
print "<pre>";
print_r ($text . "<br />");
print (gettype($text) . "<br /> <br />");
print "</pre>";
}
return mysqli_real_escape_string($active_db, $text);
}
This is the output.
<pre><br>NULL<br> <br></pre>
<pre><br>NULL<br> <br></pre>
<pre>1<br>integer<br> <br></pre>
What is going on here?
Comments
Comment #1
liren.zhu commentedI'm getting the same error when clicking Tag with Calais even without Semantic Proxy on.
Changing Component to Code.