Posted by Adam S on November 6, 2010 at 5:45pm
2 followers
Jump to:
| Project: | OpenCalais |
| Version: | 6.x-3.5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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
#1
I'm getting the same error when clicking Tag with Calais even without Semantic Proxy on.
Changing Component to Code.