Compare commits

...
4 Commits
Author SHA1 Message Date
Adrien Loison 2074781852 Merge pull request #22 from box/bump_version_to_1.0.4
Bump version to 1.0.4
2015-04-16 13:17:24 -07:00
Adrien Loison fd5cfc5440 Bump version to 1.0.4 2015-04-16 13:13:05 -07:00
Adrien Loison a538813827 Merge pull request #21 from box/fix_empty_shared_string_bug
Fix empty shared string bug
2015-04-16 13:08:56 -07:00
Adrien Loison 3e5ef284a5 Fix empty shared string bug
Replaced !$sharedString by $sharedString === null to avoid the case
when $sharedString = ''
2015-04-16 13:00:02 -07:00
4 changed files with 15 additions and 2 deletions

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
"name": "box/spout",
"description": "PHP Library to read and write CSV and XLSX files, in a fast and scalable way",
"type": "library",
"version": "1.0.3",
"version": "1.0.4",
"keywords": ["php","read","write","csv","xlsx","excel","spreadsheet","scale","memory","stream","ooxml"],
"license": "Apache-2.0",
"homepage": "https://www.github.com/box/spout",
@@ -257,7 +257,7 @@ class SharedStringsHelper
$sharedString = $this->unescapeLineFeed($escapedSharedString);
}
if (!$sharedString) {
if ($sharedString === null) {
throw new SharedStringNotFoundException("Shared string not found for index: $sharedStringIndex");
}
+13
View File
@@ -140,6 +140,19 @@ class XLSXTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($expectedRows, $allRows);
}
/**
* @return void
*/
public function testReadShouldSupportEmptySharedString()
{
$allRows = $this->getAllRowsForFile('sheet_with_empty_shared_string.xlsx');
$expectedRows = [
['s1--A1', '', 's1--C1'],
];
$this->assertEquals($expectedRows, $allRows);
}
/**
* @return void
*/