Skip to content

Commit

Permalink
修正將 extension 轉小寫的時機
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyworm authored Jan 12, 2018
1 parent 57b9dc8 commit 0015967
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/OfficeConverter/OfficeConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -141,8 +142,6 @@ protected function prepOutput($outdir, $filename, $outputExtension)
*/
private function getAllowedConverter($extension = null)
{
$extension = strtolower($extension);

$allowedConverter = [
'pptx' => ['pdf'],
'ppt' => ['pdf'],
Expand Down

0 comments on commit 0015967

Please sign in to comment.