Skip to content

Undefined offset #50

@tostercx

Description

@tostercx

Hi,

I sometimes get undefined offsets at this line:
https://github.com/PhenX/php-font-lib/blob/0.4/src/FontLib/BinaryStream.php#L379

Happened when using Dompdf with font stripping turned on with bold Times New Roman.
It seems to work correctly if I check if $data[$i] is set and return null otherwise.

$ret += $this->w($type[0], isset($data[$i]) ? $data[$i] : null);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions