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

Error when upgrading PHP to 7.4 #6

Open
alexmahan opened this issue May 17, 2021 · 2 comments
Open

Error when upgrading PHP to 7.4 #6

alexmahan opened this issue May 17, 2021 · 2 comments

Comments

@alexmahan
Copy link

Hi, my web host recently required us to upgrade to PHP 7.4 from 7.2 for security reasons.

After upgrading, I receive this error on a page that uses Printmaker:
Screen Shot 2021-05-17 at 10 49 38 AM

I'm not super knowledgeable at PHP so I'm hesitant to open a PR, but wondering if this is something that's relatively trivial to fix?

Thanks!

@michaelrog
Copy link
Member

I'm not able to reproduce this offhand in my 7.4 env, but I'll be happy to look into it. If you can provide any more specific info (perhaps turn on Dev Mode to get a more detailed trace), that'd be very helpful!

@alexmahan
Copy link
Author

alexmahan commented May 17, 2021

Thanks for the quick reply!

Here's the stack trace while in dev mode:
Screen Shot 2021-05-17 at 12 59 48 PM

The code in to generate the PDF url is:

 {% set vars = {
    body: entry.body
  } %}
  {% set settings = {
    orientation: 'portrait',
    filename: artistName ~ '-cv'
  } %}
  {% set pdfUrl = craft.printmaker.pdfFromTemplate('artists/_cvPdf', vars, settings).url %}
  <h2 class="-visually-hidden">{{ artistName }} – CV</h2>
  <a target="_blank" href="{{ pdfUrl }}" class="pdf-download">Download as PDF</a>
  {{ entry.body }}

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

No branches or pull requests

2 participants