We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Can't create model by Phalcon DevTools (1.3.4)

System:Ubuntu 12.04 LTS

[email protected]:/var/www/blog$ phalcon model test

Phalcon DevTools (1.3.4)

PHP Parse error: syntax error, unexpected '[' in /var/local/phalcon-devtools-master/scripts/Phalcon/Builder/Model.php on line 373

What version of PHP are you running?



864

PHP 5.3.10-1ubuntu3.16 with Suhosin-Patch (cli) (built: Feb 13 2015 20:15:22) Copyright (c) 1997-2012 The PHP Group

edited Mar '15

The new array syntax using [] is only as of PHP 5.4, and it looks like that's what is in your source code.

You'll need to convert arrays to the traditional 'array()' syntax.



864

thanks. it has been fixed.

Do you mind sharing how did you fix this? Is there a way to do it without spending much time on it?

thanks. it has been fixed.