harrydeluxe / php-liquid

A PHP port of Ruby's Liquid Templates
http://www.delacap.com/artikel/Liquid-Templates/
MIT License
239 stars 119 forks source link

Comparison Error in src/Liquid/LocalFileSystem.php #52

Open jonkas2211 opened 6 years ago

jonkas2211 commented 6 years ago

Hello guys,

there are comparison errors in the file src/Liquid/LocalFileSystem.php. There are some comparisons like: if (!$rootRegex->match(realpath($fullPath))) wich wont be true ever, because the function match() will never return a boolean. It just returns 0 or 1... I know a bit stupid..

sanmai commented 5 years ago

In PHP-speak 0 or 1 is same as false or true.