Skip to content

Commit 536d809

Browse files
Till Bergerbsweeney
Till Berger
authored andcommitted
Fix one more deprecation notice with PHP 8.1
When using font subsetting via CPDF, an empty font file is created and opened initially, and `$this->raw` will be `null` at this point.
1 parent f0546bd commit 536d809

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/FontLib/Glyph/Outline.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class Outline extends BinaryStream {
3333
public $xMax;
3434
public $yMax;
3535

36+
/**
37+
* @var string|null
38+
*/
3639
public $raw;
3740

3841
/**
@@ -96,7 +99,7 @@ function parseData() {
9699
function encode() {
97100
$font = $this->getFont();
98101

99-
return $font->write($this->raw, mb_strlen($this->raw, '8bit'));
102+
return $font->write($this->raw, mb_strlen((string) $this->raw, '8bit'));
100103
}
101104

102105
function getSVGContours() {

0 commit comments

Comments
 (0)