Where did you download your copy from? The file functions.php only has 82 lines!
Ah, I see, it’s the version on my site. That is a development version, there for demo purposes mostly. DocMan is getting a complete reworking, and I keep that copy there for my own use. I suppose I should rename it to make that clear. Although I don’t see why it should be causing that error, it’s the exact same function that’s running the DocMan on my site!
Ok, I still can’t figure out why it’s throwing that error, but in the functions.php file there is a function, quote_smart, that is causing the error.
// secure sql insertion
function quote_smart($value)
{
// Stripslashes
if (get_magic_quotes_gpc()) {
$value = stripslashes($value);
}
$value = mysql_real_escape_string($value);
return $value;
}
at least without this function it loses the error. But I’m still baffled, since it’s not even called anywhere when the error occurs, and certainly not in the function causing the error!
I replaced that function with this one:
// secure sql insertion
function quote_smart($value)
{
return ((!get_magic_quotes_gpc()) ? mysql_real_escape_string($value) : mysql_real_escape_string(stripslashes($value)));
}
and now it appears to work correctly.