smalot / smalot/pdfparser

chr(): Providing a value not in-between 0 and 255 is deprecated

Open Beginner friendly
#834 1 comment 0 reactions 0 assignees View on GitHub

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

https://github.com/smalot/pdfparser/blob/c6288bc4b0a18b612086755349348f14c1d373bb/src/Smalot/PdfParser/Font.php#L373

PDF input

I don't have a PDF to share.

Expected output & actual output

No deprecation warning.

Code

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.