Bugfix: Work Item 18415- mb_stripos empty delimiter
This commit is contained in:
parent
8ab0200584
commit
8f3dc270a6
|
@ -239,9 +239,12 @@ class PHPExcel_Calculation_TextData {
|
|||
$haystack = ($haystack) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||
}
|
||||
|
||||
if (($offset > 0) && (strlen($haystack) > $offset)) {
|
||||
if (($offset > 0) && (PHPExcel_Shared_String::CountCharacters($haystack) > $offset)) {
|
||||
if (PHPExcel_Shared_String::CountCharacters($needle) == 0) {
|
||||
return $offset;
|
||||
}
|
||||
if (function_exists('mb_strpos')) {
|
||||
$pos = mb_strpos($haystack, $needle, --$offset,'UTF-8');
|
||||
$pos = mb_strpos($haystack, $needle, --$offset, 'UTF-8');
|
||||
} else {
|
||||
$pos = strpos($haystack, $needle, --$offset);
|
||||
}
|
||||
|
@ -272,7 +275,10 @@ class PHPExcel_Calculation_TextData {
|
|||
$haystack = ($haystack) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||
}
|
||||
|
||||
if (($offset > 0) && (strlen($haystack) > $offset)) {
|
||||
if (($offset > 0) && (PHPExcel_Shared_String::CountCharacters($haystack) > $offset)) {
|
||||
if (PHPExcel_Shared_String::CountCharacters($needle) == 0) {
|
||||
return $offset;
|
||||
}
|
||||
if (function_exists('mb_stripos')) {
|
||||
$pos = mb_stripos($haystack, $needle, --$offset,'UTF-8');
|
||||
} else {
|
||||
|
|
|
@ -92,7 +92,7 @@ Fixed in develop branch:
|
|||
- Bugfix: (MBaker) Various fixes to Chart handling
|
||||
- Bugfix: (MBaker) Work item 18370 - Error loading xlsx file with column breaks
|
||||
- Bugfix: (MBaker) OOCalc Reader now handles percentage and currency data types
|
||||
- Bugfix: (MBaker) OOCalc Reader modified to process number-rows-repeated
|
||||
- Bugfix: (MBaker) Work Item 18415- mb_stripos empty delimiter
|
||||
|
||||
|
||||
2012-05-19 (v1.7.7):
|
||||
|
|
|
@ -9,3 +9,5 @@
|
|||
"k", "Mark Baker", 5, 8
|
||||
"a", "Mark Baker", 3, 7
|
||||
"BITE", "BIT", "#VALUE!"
|
||||
"", "Mark Baker", 1
|
||||
"", "Mark Baker", 8, 8
|
||||
|
|
Loading…
Reference in New Issue