Skip to content

Uncaught crash with html header or footer caused by wrong length estimation #464

Open
@Adelysnet

Description

@Adelysnet

Hi,

i don't know the exact reason, but some times, html headers|footers (strings) sent in option don't pass the isFile test, crashing with a 500 error code. i suppose, depending of the encoding (utf8 in my case), the value length is miscalculated and this test fails in the AbstractGenerator (line 695) :

protected function isFile($filename)
{
return \strlen($filename) <= \PHP_MAXPATHLEN && \is_file($filename);
}

causing the is_file function to crash. I tried to replace strlen by mb_strlen without success but add an error control operator @\is_file does the trick :

protected function isFile($filename) { return \strlen($filename) <= \PHP_MAXPATHLEN && @\is_file($filename); }

Metadata

Metadata

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