Skip to content

Commit 5c3b630

Browse files
authored
Merge branch 'master' into issue4004td
2 parents a3c6f8f + 1c06890 commit 5c3b630

File tree

7 files changed

+36
-9
lines changed

7 files changed

+36
-9
lines changed

.github/workflows/github-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
- name: Setup PHP, with composer and extensions
1919
uses: shivammathur/setup-php@v2
2020
with:
21-
php-version: 8.1
21+
php-version: 8.3
2222
coverage: none # remove xdebug
2323

2424
- name: Build API documentation
2525
run: |
26-
curl -LO https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.4.1/phpDocumentor.phar
26+
curl -LO https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.5.0/phpDocumentor.phar
2727
php phpDocumentor.phar --directory src/ --target docs/api
2828
2929
- name: Deploy to GithHub Pages

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
- name: Setup PHP, with composer and extensions
7575
uses: shivammathur/setup-php@v2
7676
with:
77-
php-version: 8.1
77+
php-version: 8.3
7878
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
7979
coverage: none
8080

@@ -91,7 +91,7 @@ jobs:
9191
- name: Setup PHP, with composer and extensions
9292
uses: shivammathur/setup-php@v2
9393
with:
94-
php-version: 8.1
94+
php-version: 8.3
9595
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
9696
coverage: none
9797
tools: cs2pr
@@ -122,7 +122,7 @@ jobs:
122122
- name: Setup PHP, with composer and extensions
123123
uses: shivammathur/setup-php@v2
124124
with:
125-
php-version: 8.1
125+
php-version: 8.3
126126
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
127127
coverage: none
128128
tools: cs2pr
@@ -153,7 +153,7 @@ jobs:
153153
- name: Setup PHP, with composer and extensions
154154
uses: shivammathur/setup-php@v2
155155
with:
156-
php-version: 8.1
156+
php-version: 8.3
157157
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
158158
coverage: none
159159
tools: cs2pr
@@ -184,7 +184,7 @@ jobs:
184184
- name: Setup PHP, with composer and extensions
185185
uses: shivammathur/setup-php@v2
186186
with:
187-
php-version: 8.1
187+
php-version: 8.3
188188
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
189189
coverage: none
190190
tools: cs2pr
@@ -217,7 +217,7 @@ jobs:
217217
- name: Setup PHP, with composer and extensions
218218
uses: shivammathur/setup-php@v2
219219
with:
220-
php-version: 8.1
220+
php-version: 8.3
221221
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
222222
coverage: pcov
223223

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build:
1414
analysis:
1515
image: default-bionic
1616
environment:
17-
php: 8.1
17+
php: 8.2
1818
tests:
1919
override:
2020
- php-scrutinizer-run

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
3434
- Conditional Range Unions and Intersections [Issue #4039](https://github.com/PHPOffice/PhpSpreadsheet/issues/4039) [PR #4042](https://github.com/PHPOffice/PhpSpreadsheet/pull/4042)
3535
- Csv Reader allow use of html mimetype. [Issue #4036](https://github.com/PHPOffice/PhpSpreadsheet/issues/4036) [PR #4049](https://github.com/PHPOffice/PhpSpreadsheet/pull/4040)
3636
- More RTL in Xlsx/Html Comments [Issue #4004](https://github.com/PHPOffice/PhpSpreadsheet/issues/4004) [PR #4065](https://github.com/PHPOffice/PhpSpreadsheet/pull/4065)
37+
- Empty String in sharedStrings. [Issue #4063](https://github.com/PHPOffice/PhpSpreadsheet/issues/4063) [PR #4064](https://github.com/PHPOffice/PhpSpreadsheet/pull/4064)
3738

3839
## 2024-05-11 - 2.1.0
3940

src/PhpSpreadsheet/Reader/Xlsx.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,8 @@ protected function loadSpreadsheetFromFile(string $filename): Spreadsheet
701701
$sharedStrings[] = StringHelper::controlCharacterOOXML2PHP((string) $val->t);
702702
} elseif (isset($val->r)) {
703703
$sharedStrings[] = $this->parseRichText($val);
704+
} else {
705+
$sharedStrings[] = '';
704706
}
705707
}
706708
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace PhpOffice\PhpSpreadsheetTests\Reader\Xlsx;
6+
7+
use PhpOffice\PhpSpreadsheet\IOFactory;
8+
use PHPUnit\Framework\TestCase;
9+
10+
class Issue4063Test extends TestCase
11+
{
12+
private static string $testbook = 'tests/data/Reader/XLSX/issue.4063.xlsx';
13+
14+
public function testSharedStringsWithEmptyString(): void
15+
{
16+
$spreadsheet = IOFactory::load(self::$testbook);
17+
$sheet = $spreadsheet->getActiveSheet();
18+
$data = $sheet->toArray(null, true, true, true);
19+
$nbsp = "\u{00a0}";
20+
self::assertSame(['A' => '226', 'B' => '', 'C' => $nbsp], $data[17]);
21+
self::assertSame(['A' => '38873', 'B' => 'gg', 'C' => ' '], $data[22]);
22+
$spreadsheet->disconnectWorksheets();
23+
}
24+
}
6.76 KB
Binary file not shown.

0 commit comments

Comments
 (0)