Open st2cs opened 10 years ago
@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.
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