image cacheFilename checks for numeric strings

using JSON_NUMERIC_CHECK json_encode flag and avoid duplicate files
creation
This commit is contained in:
colymba 2013-10-22 12:01:24 +03:00
parent fad8926785
commit 46272ffb93

View File

@ -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)) {