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(libraries): resolve tcpdf incompatibility with PHP 7.2 #3411

Closed
Benunc opened this issue Jun 27, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@Benunc
Copy link
Member

commented Jun 27, 2018

User Story

As a give developer, I want to use open source and PHP 7.2-compatible libraries to generate PDFs.

TCPDF is currently not compatible with PHP 7.2, specifically the deprecated funciton each() at give/includes/libraries/tcpdf/tcpdf.php on line 16548. It appears that development has stopped on that library at https://github.com/tecnickcom/TCPDF and the new library is not complete/stable yet.

Current Behavior

I currently get an error on PHP 7.2 when trying to generate a PDF.

Expected Behavior

I expect to have PHP 7.2 compatibility.

Steps to Reproduce

  1. Update the local PHP version to 7.2.x
  2. Generate a custom PDF using one of the methods that uses TCPDF. (may require an add-on, but the library itself lives in Give Core)
  3. anywhere the each() function is will generate a fatal error Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /app/public/wp-content/plugins/give/includes/libraries/tcpdf/tcpdf.php on line 16548

Related

Tasks

  • Update TCPDF library to 6.2.17.
  • Test all PDF functionality in Give and its add-ons using PHP 7.2.
@kevinwhoffman

This comment has been minimized.

Copy link
Member

commented Jun 27, 2018

This should be fixed in a more recent release of TCPDF according to this PR.

The version of TCPDF in Give is 6.2.13 but the latest release available is 6.2.17.

@raftaar1191 please look into updating TCPDF and post whether you feel there would be any side effects to upgrading. We'll also need to test existing PDF functionality in PHP 7.2.

@raftaar1191

This comment has been minimized.

Copy link
Member

commented Jun 28, 2018

@kevinwhoffman

I check the TCPDF Version 6.2.13 I can there are some outdated PHP functions which are not going to work in PHP 7.2.

I also had a look into TCPDF Version 6.2.17 and that is working fine in PHP version 5.3 to 7.2

We just need to update the library and do some testing to check the PDF is generated properly or not in Give Core as well in Add-on

@raftaar1191

This comment has been minimized.

Copy link
Member

commented Jun 28, 2018

ravinderk added a commit that referenced this issue Jun 28, 2018

Merge pull request #3418 from WordImpress/issue/3411
fix(libraries): resolve tcpdf incompatibility with PHP 7.2 #3411

@ravinderk ravinderk closed this Jun 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.