Fix for a single character string in a call to PHPExcel_Shared_Date::stringToExcel() being treated as a valid date
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@62207 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
		
							parent
							
								
									10634822fe
								
							
						
					
					
						commit
						ad9e4e2f0f
					
				@ -277,6 +277,9 @@ class PHPExcel_Shared_Date
 | 
				
			|||||||
	 * @return	float|false		Excel date/time serial value
 | 
						 * @return	float|false		Excel date/time serial value
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public static function stringToExcel($dateValue = '') {
 | 
						public static function stringToExcel($dateValue = '') {
 | 
				
			||||||
 | 
							if (strlen($dateValue) < 2)
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		$dateValueNew = PHPExcel_Calculation_Functions::DATEVALUE($dateValue);
 | 
							$dateValueNew = PHPExcel_Calculation_Functions::DATEVALUE($dateValue);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if ($dateValueNew === PHPExcel_Calculation_Functions::VALUE()) {
 | 
							if ($dateValueNew === PHPExcel_Calculation_Functions::VALUE()) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user