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 TypeError on default font when no fonts available #466

Merged
merged 3 commits into from
Oct 18, 2021
Merged

Fix TypeError on default font when no fonts available #466

merged 3 commits into from
Oct 18, 2021

Conversation

PrinsFrank
Copy link
Contributor

When there is no font available for a page, 'getFirstFont' returns null. GetDefaultFont then returns that null value, where the returntype is 'Font', causing a TypeError. This PR fixes that issue.

@PrinsFrank PrinsFrank changed the title Fix default font when no fonts available Fix TypeError on default font when no fonts available Oct 8, 2021
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.

Good catch!

tests/Unit/PDFObjectTest.php Show resolved Hide resolved
@k00ni k00ni added the fix label Oct 18, 2021
@k00ni k00ni merged commit 4d6864a into smalot:master Oct 18, 2021
@PrinsFrank PrinsFrank deleted the fix-default-font-when-no-fonts-available branch October 18, 2021 14:19
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.

2 participants