Skip to content

Conversation

@BuslikDrev
Copy link
Contributor

@BuslikDrev BuslikDrev commented Dec 19, 2024

…pe int is deprecated in FontLib\BinaryStream.php on line 123

Unknown: fseek(): Passing null to parameter 2 ($offset) of type int is deprecated in FontLib\BinaryStream.php on line 123

… of type int is deprecated in FontLib\BinaryStream.php on line 123

Unknown: fseek(): Passing null to parameter dompdf#2 ($offset) of type int is deprecated in FontLib\BinaryStream.php on line 123
@bsweeney
Copy link
Member

Can you outline the scenario where this error occurs? FontLib shouldn't attempt to read the font file with a null offset so this could be indicative of a parsing error.

@BuslikDrev
Copy link
Contributor Author

Can you outline the scenario where this error occurs? FontLib shouldn't attempt to read the font file with a null offset so this could be indicative of a parsing error.

Позже посмотрю в какой момент это происходит и пришлю результат.

@bsweeney bsweeney added this to the 1.0.2 milestone Dec 21, 2024
@bsweeney
Copy link
Member

Any luck identifying the cause of the issue? Or, if you can indicate the font and the operation I should be able to figure out what happened.

@BuslikDrev
Copy link
Contributor Author

Any luck identifying the cause of the issue? Or, if you can indicate the font and the operation I should be able to figure out what happened.

Со шрифтами всё хорошо работает при использовании стандартного кода для их редактирования.
Если для других целей использовать вызов, например, $glyph = new FontLib\Glyph\Outline($this); $glyph->parse($font); то в $offset пойдёт значение null

@bsweeney
Copy link
Member

bsweeney commented Jan 8, 2026

I can see how that would result in the issue, but this particular use case doesn't really make much sense even though it's valid logic. The Outline classes require an offset and size to do anything. Otherwise parsing the table returns nothing.

It probably makes sense to require a valid integer instead, though that's for later. In the meantime, this change does address the notice while maintaining existing functionality.

@bsweeney bsweeney merged commit 8a96df1 into dompdf:master Jan 8, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants