From f5bd6dc0f2bb7e76502494912805b51d96ef2de8 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Mon, 18 Nov 2013 14:28:22 +0000 Subject: [PATCH] Bugfix: (IndrekHaav) Work Item CP16208 - Fixed undefined variable error due to $styleArray being used before it's initialised --- Classes/PHPExcel/Reader/Gnumeric.php | 2 +- changelog.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Reader/Gnumeric.php b/Classes/PHPExcel/Reader/Gnumeric.php index 50e7a8a..9e2b241 100644 --- a/Classes/PHPExcel/Reader/Gnumeric.php +++ b/Classes/PHPExcel/Reader/Gnumeric.php @@ -511,7 +511,7 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx // We still set the number format mask for date/time values, even if _readDataOnly is true if ((!$this->_readDataOnly) || - (PHPExcel_Shared_Date::isDateTimeFormatCode($styleArray['numberformat']['code']))) { + (PHPExcel_Shared_Date::isDateTimeFormatCode((string) $styleAttributes['Format']))) { $styleArray = array(); $styleArray['numberformat']['code'] = (string) $styleAttributes['Format']; // If _readDataOnly is false, we set all formatting information diff --git a/changelog.txt b/changelog.txt index 13b7964..17b8281 100644 --- a/changelog.txt +++ b/changelog.txt @@ -36,6 +36,7 @@ Fixed in develop branch for release v1.8.0: Fix also applied to duplicating conditional styles - Bugfix: (IndrekHaav) Work Item GH-212 - Fix for formulae that reference a sheet whose name begins with a digit: these were erroneously identified as numeric values, causing the parser to throw an undefined variable error. +- Bugfix: (IndrekHaav) Work Item CP16208 - Fixed undefined variable error due to $styleArray being used before it's initialised - Feature: (amerov) - Implementation of the Excel HLOOKUP() function - Feature: (MBaker) - Added "Quote Prefix" to style settings (Excel2007 Reader and Writer only) - Feature: (MBaker) - Added Horizontal FILL alignment for Excel5 and Excel2007 Readers/Writers, and Horizontal DISTRIBUTED alignment for Excel2007 Reader/Writer