Closed Blackskyliner closed 1 year ago
Argh, duplicates https://github.com/rainphp/raintpl3/pull/152 - I should look better before creating Pull requests. But I will leave this open for now, as I don't see the need for the check added by https://github.com/rainphp/raintpl3/pull/152. As the file is already empty, why execute PHP safeguard which also only results in an empty page?
If an template was empty it threw an error, as fread expects $length to be greater than 0. Patched it with an additional check for actual filesize and fallback to an empty string if file is empty, also skip the processing if $code is empty.