chr(): Providing a value not in-between 0 and 255 is deprecated
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 579
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
- PHP Version: 8.5.8
- PDFParser Version: dev-master
Description:
PHP Deprecated: chr(): Providing a value not in-between 0 and 255 is deprecated, this is because a byte value must be in the [0, 255] interval. The value used will be constrained using % 256 in /smalot/pdfparser/src/Smalot/PdfParser/Font.php on line 373
PDF input
I don't have a PDF to share.
Expected output & actual output
No deprecation warning.
Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting src/Smalot/PdfParser/Font.php at line 373, where chr() emits the PHP 8.5.8 deprecation. Reproduce the warning with a representative parser input, then verify the change prevents the warning while preserving the expected parsed output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100