From 15ef0b00df3b626061ec5ef96bcce9d43fc1e9d0 Mon Sep 17 00:00:00 2001 From: Jack W-H Date: Sun, 23 Apr 2017 15:47:59 +0100 Subject: [PATCH] Fixed a bug where file path strings would be evaluated as Base64-data --- src/Intervention/Image/AbstractDecoder.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Intervention/Image/AbstractDecoder.php b/src/Intervention/Image/AbstractDecoder.php index c421c7d9..419d5cfc 100644 --- a/src/Intervention/Image/AbstractDecoder.php +++ b/src/Intervention/Image/AbstractDecoder.php @@ -329,12 +329,12 @@ abstract class AbstractDecoder case $this->isDataUrl(): return $this->initFromBinary($this->decodeDataUrl($this->data)); - case $this->isBase64(): - return $this->initFromBinary(base64_decode($this->data)); - case $this->isFilePath(): return $this->initFromPath($this->data); + case $this->isBase64(): + return $this->initFromBinary(base64_decode($this->data)); + default: throw new Exception\NotReadableException("Image source not readable"); }