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

Annotations error #24

Open
dantezunino opened this issue Dec 29, 2021 · 0 comments
Open

Annotations error #24

dantezunino opened this issue Dec 29, 2021 · 0 comments

Comments

@dantezunino
Copy link

Hi Paul, i found this 2 problems with the annotations in TCPDI:

In line 286, instead of

&& is_array($annots[1][1]) && count($annots[1][1] > 1)

it should be:

&& is_array($annots[1][1]) && (count($annots[1][1]) > 1)


And in line 293 to 295 instead of

foreach ($annots[1][1] as $annot) {
$this->importAnnotation($annot);
}

there should a conditional to check the annotations are not null:

foreach ($annots[1][1] as $annot) {
if($annot != null){
$this->importAnnotation($annot);
}
}

This prevents an error that occurs when using this function when there are no annotations.


Thanks for all you have shared man!
(Sorry for bad english)

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

1 participant