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 error when Font aren't available #324

Merged
merged 1 commit into from
Aug 31, 2020
Merged

Conversation

j0k3r
Copy link
Collaborator

@j0k3r j0k3r commented Aug 21, 2020

This can happen (like in many places of Page.php) when the retrieved element is missing (and the instance if ElementMissing. In that case, we just return an empty array (the default value).

Fix #321

@j0k3r j0k3r added the fix label Aug 21, 2020
@j0k3r j0k3r requested review from k00ni and smalot August 21, 2020 09:56
Copy link
Collaborator

@k00ni k00ni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Can you add a simple test which touches/triggers these new lines?

@j0k3r
Copy link
Collaborator Author

j0k3r commented Aug 25, 2020

I'll try but none of the ElementMissing case in that file are tested actually 😞

@j0k3r j0k3r requested a review from k00ni August 31, 2020 07:01
Copy link
Collaborator

@k00ni k00ni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking the time to add a test. 👍

This can happen (like in many places of `Page.php`) when the retrieved element is missing (and the instance if `ElementMissing`. In that case, we just return an empty array (the default value).
@j0k3r j0k3r force-pushed the fix/font-elementmissing branch from 84fb055 to cc4c77f Compare August 31, 2020 11:21
@j0k3r j0k3r merged commit 5faf073 into master Aug 31, 2020
@j0k3r j0k3r deleted the fix/font-elementmissing branch August 31, 2020 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fatal error: Call to undefined method Smalot\PdfParser\Element\ElementMissing::getHeader()
2 participants