|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-27 04:18 UTC] scottmacvicar at ntlworld dot com
[2006-03-27 09:51 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 12:00:01 2025 UTC |
Description: ------------ sqlite_escape_string on '' (the empty string) or null returns the wrong value. I would guess that: sqlite_escape_string ('') should return '', and sqlite_escape_string (null) should return null. Additionally, you can see that what sqlite_escape_string actually does return in these cases is a mangled version of the previous non-null input string. This bug appears to have been fixed in PHP5, but not yet in PHP4. http://bugs.php.net/bug.php?id=29339 http://bugs.php.net/bug.php?id=29395 Reproduce code: --------------- <?php print bin2hex (sqlite_escape_string ('xxx')). "\n"; print bin2hex (sqlite_escape_string ('')). "\n"; print bin2hex (sqlite_escape_string (null)). "\n"; print "done\n"; ?> Expected result: ---------------- 787878 done Actual result: -------------- 787878 ac7878 ac7878 done