Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP8.2 deprecated warnings in getHtmlDomArray() in tcpdf.php #687

Closed
wants to merge 2 commits into from

Conversation

johnson361
Copy link
Contributor

In the event that the $html variable is either null or has any falsy value, we promptly return an empty array. This optimization not only ensures that we avoid executing the entire function but also addresses the E_DEPRECATED warning associated with passing null to the preg_match_all function, contributing to improved performance and code stability.

Fixes #670

tcpdf.php Outdated Show resolved Hide resolved
support old php versions

Co-authored-by: William Desportes <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5fce932) 69.28% compared to head (625787e) 69.34%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #687      +/-   ##
==========================================
+ Coverage   69.28%   69.34%   +0.06%     
==========================================
  Files         128      128              
  Lines       26961    27029      +68     
==========================================
+ Hits        18679    18744      +65     
- Misses       8282     8285       +3     
Flag Coverage Δ
php-5.3-ubuntu-latest 68.86% <100.00%> (-0.01%) ⬇️
php-5.4-ubuntu-latest 68.86% <100.00%> (+<0.01%) ⬆️
php-5.5-ubuntu-latest 68.86% <100.00%> (+<0.01%) ⬆️
php-5.6-ubuntu-latest 68.93% <100.00%> (+<0.01%) ⬆️
php-7.0-ubuntu-latest 71.60% <50.00%> (+<0.01%) ⬆️
php-8.3-ubuntu-latest 72.85% <50.00%> (?)
php-nightly-ubuntu-latest 72.84% <50.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johnson361
Copy link
Contributor Author

Can anyone please Merge my PR ?

@williamdes
Copy link
Contributor

Can anyone please Merge my PR ?

Please be patient, @nicolaasuni does merged every some months :)

@nicolaasuni
Copy link
Member

This a been fixed in 6.7.3. but I had to return a non-empty array to avoid #699,

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.

PHP8.2 deprecated warnings in getHtmlDomArray() in tcpdf.php
4 participants