note 45793 deleted from function.sqlite-escape-string by aidan
| From: | aidan@php.net | Date: | Sun, 19 Sep 2004 03:51:16 +0000 |
| Subject: | note 45793 deleted from function.sqlite-escape-string by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76973@lists.php.net to get a copy of this message | ||
Note Submitter: matthew at teh dot ath dot (ignore) cx
----
On my PHP version (5.0.0), sqlite_escape_string returns crap when the argument is an empty string.
As you can imagine this may cause problems ;), so I use a wrapper function:
// Weird bug in sqlite_escape_string, apparently
function fixed_sqlite_escape_string($string) {
if($string === '') {
return '';
}
else {
return sqlite_escape_string($string);
}
}