Skip to content
Snippets Groups Projects
Commit 3075e9c7 authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

#92430 by Jo Wouters. Encode blobs as blobs.

parent b245ff5b
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -92,9 +92,9 @@ function cache_get($key, $table = 'cache') {
*/
function cache_set($cid, $table = 'cache', $data, $expire = CACHE_PERMANENT, $headers = NULL) {
db_lock_table($table);
db_query("UPDATE {%s} SET data = '%s', created = %d, expire = %d, headers = '%s' WHERE cid = '%s'", $table, $data, time(), $expire, $headers, $cid);
db_query("UPDATE {%s} SET data = %b, created = %d, expire = %d, headers = '%s' WHERE cid = '%s'", $table, $data, time(), $expire, $headers, $cid);
if (!db_affected_rows()) {
@db_query("INSERT INTO {%s} (cid, data, created, expire, headers) VALUES ('%s', '%s', %d, %d, '%s')", $table, $cid, $data, time(), $expire, $headers);
@db_query("INSERT INTO {%s} (cid, data, created, expire, headers) VALUES ('%s', %b, %d, %d, '%s')", $table, $cid, $data, time(), $expire, $headers);
}
db_unlock_tables();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment