artlantis / phamlp

Automatically exported from code.google.com/p/phamlp
0 stars 0 forks source link

Haml Integer values in select options #126

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. Parse the following with HamlParser (no options used) :

%select
    %option{:value => '0'} Transport
    %option{:value => '1'} Manufacturing
    %option{:value => '2'} Logistics
    %option{:value => '3'} Supplying

Expected output is a select element containing options whose values are 
Integers. Instead, following messages are displayed and rendering is broken :

Notice: Undefined offset: 7 in src/includes/PHamlP_3.2/haml/HamlParser.php on 
line 959

Notice: Undefined offset: 7 in src/includes/PHamlP_3.2/haml/HamlParser.php on 
line 966

It seems that '0' and '1' are not correctly interpreted (Boolean instead ?). 
Other values such as '2', or '10' are fine. However, I'm not sure how to fix it 
properly right now, or if that behaviour is intended (which I seriously doubt).

I'm using PhamlP 3.2 with PHP 5.4.10 on Arch Linux, default setup.

Original issue reported on code.google.com by mbu...@gmail.com on 21 Dec 2012 at 9:21

GoogleCodeExporter commented 9 years ago
I forgot this report, but it works fine with double quotes, though "0" still 
doesn't.

Original comment by mbu...@gmail.com on 16 Jan 2013 at 9:56

GoogleCodeExporter commented 9 years ago
Hi, Any update on this issue? Is there a workaround for this??

Original comment by t...@techbrosinc.com on 18 Nov 2014 at 6:56