raintpl3
raintpl3 copied to clipboard
Warning: fread() in Parser.php
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 please review https://github.com/rainphp/raintpl3/pull/152
@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.