mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
image cacheFilename checks for numeric strings
using JSON_NUMERIC_CHECK json_encode flag and avoid duplicate files creation
This commit is contained in:
parent
fad8926785
commit
46272ffb93
@ -442,7 +442,7 @@ class Image extends File {
|
||||
array_shift($args);
|
||||
$folder = $this->ParentID ? $this->Parent()->Filename : ASSETS_DIR . "/";
|
||||
|
||||
$format = $format . base64_encode(json_encode($args));
|
||||
$format = $format . base64_encode(json_encode($args, JSON_NUMERIC_CHECK));
|
||||
$filename = $format . "-" . $this->Name;
|
||||
$patterns = $this->getFilenamePatterns($this->Name);
|
||||
if (!preg_match($patterns['FullPattern'], $filename)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user