fortrabbit / datafilter

A data validation (sanitation) module for PHP
MIT License
10 stars 4 forks source link

Result.php code, as written, requires PHP 5.4 #2

Open micmath opened 11 years ago

micmath commented 11 years ago

I get

Parse error: syntax error, unexpected '[' in php/vendor/datafilter/datafilter/src/DataFilter/Result.php on line 437

which has this code:

$this->validAttribs[$attribName] = ['value' => $default, 'attrib' => &$attrib];

I'm using PHP 5.3.15 and your project's github homepage says "PHP 5.3 is required" strongly implying that it does not require 5.4. But according to the PHP.net docs "As of PHP 5.4 you can also use the short array syntax, which replaces array() with []."

Something needs to be clarified here.

ukautz commented 11 years ago

Yes, you are right, the tests are still 5.4. Will downgrade them soon to be compatible with 5.3.