raintpl3 icon indicating copy to clipboard operation
raintpl3 copied to clipboard

Warning: fread() in Parser.php

Open st2cs opened this issue 10 years ago • 2 comments

When a 0 length template is loaded PHP sends a warning. "Warning: fread(): Length parameter must be greater than 0 in (...)"

The warning comes from the metehod "compileFile", in the line "$this->templateInfo['code'] = $code = fread($fp, filesize($templateFilepath));" in the Parser.php file

st2cs avatar May 14 '14 14:05 st2cs

@st2cs please review https://github.com/rainphp/raintpl3/pull/152

feulf avatar May 14 '14 15:05 feulf

@rainphp Added #175 - should fix the error, I use this in production already. Sorry for the duplicated pull-request, but I didn't looked up the pending requests before creating mine.

Blackskyliner avatar May 27 '15 06:05 Blackskyliner