feulf / raintpl3

The easiest Template Engine for PHP
https://feulf.github.io/raintpl
258 stars 57 forks source link

Warning: fread() in Parser.php #151

Open st2cs opened 10 years ago

st2cs commented 10 years ago

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

feulf commented 10 years ago

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

Blackskyliner commented 9 years ago

@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.