diff --git a/src/OfficeConverter/OfficeConverter.php b/src/OfficeConverter/OfficeConverter.php index 5a00dc2..c6f377b 100644 --- a/src/OfficeConverter/OfficeConverter.php +++ b/src/OfficeConverter/OfficeConverter.php @@ -83,6 +83,7 @@ protected function setup($tempPath, $bin) //extension $extension = pathinfo($this->file, PATHINFO_EXTENSION); + $extension = strtolower($extension); //Check for valid input file extension if (!array_key_exists($extension, $this->getAllowedConverter())) { throw new OfficeConverterException('Input file extension not supported -- '.$extension); @@ -141,8 +142,6 @@ protected function prepOutput($outdir, $filename, $outputExtension) */ private function getAllowedConverter($extension = null) { - $extension = strtolower($extension); - $allowedConverter = [ 'pptx' => ['pdf'], 'ppt' => ['pdf'],