Skip to content
Snippets Groups Projects
Commit f1435a5d authored by Alberto Paderno's avatar Alberto Paderno
Browse files

Issue #3466210: In DrupalApcCache::binaryToHex(), return an empty string for an empty string

parent 290530d8
No related branches found
No related tags found
1 merge request!56Issue #3466210: In DrupalApcCache::binaryToHex(), return an empty string for an empty string
Pipeline #245382 passed
......@@ -80,7 +80,9 @@ protected function binaryToHex($data) {
}
elseif (is_string($data)) {
if ($data === '') {
return unpack("H*", "\2\1\4")[1];
// If an empty string is an acceptable value for the caller, return an
// empty string.
return '';
}
return unpack("H*", "\0\0\4$data")[1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment