File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
src/Document/Dictionary/DictionaryValue/Date Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -7,5 +7,6 @@ ignore-hidden = false
77[default .extend-words ]
88"flate" = " flate"
99"fo" = " fo"
10+ "hel" = " hel"
1011"paeth" = " paeth"
1112"parms" = " parms"
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public static function fromValue(string $valueString): ?self {
3535
3636 if (!str_starts_with ($ valueString , 'D: ' )) {
3737 $ valueString = mb_convert_encoding ($ valueString , 'UTF-8 ' , 'UTF-16 ' );
38- if (!str_starts_with ($ valueString , 'D: ' )) {
38+ if ($ valueString === false || !str_starts_with ($ valueString , 'D: ' )) {
3939 return null ;
4040 }
4141 }
Original file line number Diff line number Diff line change @@ -158,21 +158,21 @@ public function testParseWithMultibyteEscapedStringLiteralDelimiterInStringLiter
158158 (new TextObject ())
159159 ->addContentStreamCommand (new ContentStreamCommand (TextShowingOperator::SHOW , '(Hel ' . chr (233 ) . '\)lo) ' ))
160160 ),
161- ContentStreamParser::parse ('BT (Hel ' . chr (233 ) .'\)lo) Tj ET ' )
161+ ContentStreamParser::parse ('BT (Hel ' . chr (233 ) . '\)lo) Tj ET ' )
162162 );
163163 static ::assertEquals (
164164 new ContentStream (
165165 (new TextObject ())
166166 ->addContentStreamCommand (new ContentStreamCommand (TextShowingOperator::SHOW , '(Hel ' . chr (233 ) . chr (108 ) . '\)lo) ' ))
167167 ),
168- ContentStreamParser::parse ('BT (Hel ' . chr (233 ) . chr (108 ) .'\)lo) Tj ET ' )
168+ ContentStreamParser::parse ('BT (Hel ' . chr (233 ) . chr (108 ) . '\)lo) Tj ET ' )
169169 );
170170 static ::assertEquals (
171171 new ContentStream (
172172 (new TextObject ())
173173 ->addContentStreamCommand (new ContentStreamCommand (TextShowingOperator::SHOW , '(Hel ' . chr (233 ) . chr (108 ) . chr (58 ) . '\)lo) ' ))
174174 ),
175- ContentStreamParser::parse ('BT (Hel ' . chr (233 ) . chr (108 ) . chr (58 ) .'\)lo) Tj ET ' )
175+ ContentStreamParser::parse ('BT (Hel ' . chr (233 ) . chr (108 ) . chr (58 ) . '\)lo) Tj ET ' )
176176 );
177177 }
178178
Original file line number Diff line number Diff line change 1010class WinAnsiTest extends TestCase {
1111 public function testToUnicode (): void {
1212 $ string = mb_convert_encoding ('transakèní ' , 'Windows-1252 ' );
13+ static ::assertNotFalse ($ string );
1314 static ::assertEquals ('transakèní ' , WinAnsi::textToUnicode ($ string ));
1415 }
1516
You can’t perform that action at this time.
0 commit comments