From 46272ffb934c774e1136da0d55ee4596560b9eaa Mon Sep 17 00:00:00 2001 From: colymba Date: Tue, 22 Oct 2013 12:01:24 +0300 Subject: [PATCH] image cacheFilename checks for numeric strings using JSON_NUMERIC_CHECK json_encode flag and avoid duplicate files creation --- model/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/Image.php b/model/Image.php index 5c8f3e098..50f5240a0 100644 --- a/model/Image.php +++ b/model/Image.php @@ -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)) {