From 5af0226a6647c27be7e4a4586887f51cd31e11c4 Mon Sep 17 00:00:00 2001 From: qpautrat Date: Wed, 5 Sep 2012 13:12:51 +0200 Subject: [PATCH] Fix condition on existing file --- Classes/PHPExcel/Reader/HTML.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/PHPExcel/Reader/HTML.php b/Classes/PHPExcel/Reader/HTML.php index 5299481d..73a0fe5c 100644 --- a/Classes/PHPExcel/Reader/HTML.php +++ b/Classes/PHPExcel/Reader/HTML.php @@ -442,6 +442,10 @@ class PHPExcel_Reader_HTML implements PHPExcel_Reader_IReader throw new Exception("Could not open " . $pFilename . " for reading! File does not exist."); } + if (!is_file($pFilename)) { + throw new Exception("Could not open " . $pFilename . " for reading! The given file is not a regular file."); + } + // Create new PHPExcel while ($objPHPExcel->getSheetCount() <= $this->_sheetIndex) { $objPHPExcel->createSheet();