Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Annotations error #24

@dantezunino

Description

@dantezunino

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions