alexeyrybak/blitz

some if statements not working

Closed this issue · 2 comments

tried a few ways and not working

displayall = 0 || 1
company_inventory_link = string or empty

not working

{{ IF \$company_inventory_link != '' }}
{{ IF \$company_inventory_link != '' && displayall}}
{{ IF company_inventory_link != '' && displayall}}
{{ IF company_inventory_link && displayall}}

works

{{ IF company_inventory_link != '' }}
{{ IF displayall }}

Could you please provide the blitz version, PHP version and - ideally - a test-case like the one below (works fine with PHP 7.1.7 (cli) and blitz 0.10.3.1, but I assume you have different versions).

Thanks!

fishers-MacBook-Pro:blitz fisher$ cat github59.php

<?php

error_reporting(E_ALL);
ini_set("display_errors", "On");

$T = new Blitz();

$T->load("{{ IF \$company_inventory_link != '' }} worked... {{ END }}");
$T->display(array('company_inventory_link' => 'bla'));
echo "\n";
?>

fishers-MacBook-Pro:blitz fisher$ php7 github59.php
worked...

yep, thanks @alexeyrybak
works on our php7 server with 10.2

not on the older server. sorry for wasting your time.