diff --git a/libraries/PHPExcel/PHPExcel/Shared/OLE.php b/libraries/PHPExcel/PHPExcel/Shared/OLE.php index f52abfc47af39e5e4319a9db8a39d1a6e84097cf..77ae6fa13b8d402cc1766f0906d72db8f306e987 100644 --- a/libraries/PHPExcel/PHPExcel/Shared/OLE.php +++ b/libraries/PHPExcel/PHPExcel/Shared/OLE.php @@ -274,6 +274,7 @@ class PHPExcel_Shared_OLE // Simple conversion from UTF-16LE to ISO-8859-1 $name = str_replace("\x00", "", $nameUtf16); $type = self::_readInt1($fh); + $pps = null; switch ($type) { case self::OLE_PPS_TYPE_ROOT: $pps = new PHPExcel_Shared_OLE_PPS_Root(null, null, array()); @@ -286,9 +287,8 @@ class PHPExcel_Shared_OLE case self::OLE_PPS_TYPE_FILE: $pps = new PHPExcel_Shared_OLE_PPS_File($name); break; - default: - continue; } + if ($pps == null) continue; fseek($fh, 1, SEEK_CUR); $pps->Type = $type; $pps->Name = $name;