When uploading a file into any BLOB column in SQLite3 the file is truncated at first NUL byte. This makes image uploads unusable.
Problem is in SQLite escaping function $connection->quote($string) - SQLite truncates the string at first NUL byte.
Solution is to modify quote function to check for NUL byte and convert string to its hex representation using X'...' literal and pack('H*',$data) function.
Log in to post a comment.