diff --git a/Classes/PHPExcel/Shared/Date.php b/Classes/PHPExcel/Shared/Date.php index 18e42c11..065ebe79 100644 --- a/Classes/PHPExcel/Shared/Date.php +++ b/Classes/PHPExcel/Shared/Date.php @@ -279,6 +279,8 @@ class PHPExcel_Shared_Date public static function stringToExcel($dateValue = '') { if (strlen($dateValue) < 2) return false; + if (!preg_match('/^(\d{1,4}[ \.\/\-][A-Z]{3,9}([ \.\/\-]\d{1,4})?|[A-Z]{3,9}[ \.\/\-]\d{1,4}([ \.\/\-]\d{1,4})?|\d{1,4}[ \.\/\-]\d{1,4}([ \.\/\-]\d{1,4})?)( \d{1,2}:\d{1,2}(:\d{1,2})?)?$/iu', $dateValue)) + return false; $dateValueNew = PHPExcel_Calculation_DateTime::DATEVALUE($dateValue); diff --git a/changelog.txt b/changelog.txt index 969d4e9d..94b0d7ad 100644 --- a/changelog.txt +++ b/changelog.txt @@ -51,6 +51,7 @@ Fixed in SVN: - Bugfix: (MBaker) Work item 15129 - Worksheet fromArray() only working with 2-D arrays - Bugfix: (MBaker) Work item 15172 - rangeToarray function modified for non-existent cells - Bugfix: (MBaker) Work item 14980 - Images not getting copyied with the ->clone function +- Bugfix: (MBaker) Work item 11576 - AdvancedValueBinder.php: String sometimes becomes a date when it shouldn't - General: (MBaker) Improved performance (speed), for building the Shared Strings table in the Excel2007 Writer.