Skip to content

PHP 7.4 E_NOTICE on read error #78

@Piskvor

Description

@Piskvor

After upgrade to 7.4, this ErrorException started popping up:
Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor
Apparently this is handled in library, but the emitted E_NOTICE, converted to ErrorException by a global handler, propagates into app and crashes it.

Workaround: Mute the E_NOTICE in #77 , building upon #76.

Shortened trace:

    0 => [
        'file' => '.../vendor/phenx/php-font-lib/src/FontLib/Table/DirectoryEntry.php',
        'line' => 92,
        'function' => 'read',
        'class' => "FontLib\BinaryStream",
        'type' => '->',
    ],
    1 => [
        'file' => '.../vendor/phenx/php-font-lib/src/FontLib/TrueType/File.php',
        'line' => 251,
        'function' => 'encode',
        'class' => "FontLib\Table\DirectoryEntry",
        'type' => '->',
    ],
    2 => [
        'file' => '.../vendor/dompdf/dompdf/lib/Cpdf.php',
        'line' => 2839,
        'function' => 'encode',
        'class' => "FontLib\TrueType\File",
        'type' => '->',
    ],
    '...' => [],
];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions