ypnos-web / cakephp-datatables

CakePHP3 Plugin for DataTables plug-in for jQuery
MIT License
27 stars 24 forks source link

Cake bake causing errors #19

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi,

I found out several operators seem to break CakePHP 3's code generation.

I got errors on:

Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/berryvan/public_html/cms/vendor/ypnos-web/cakephp-datatables/src/Controller/Component/DataTablesComponent.php on line 77

Parse error: syntax error, unexpected '?' in /home/berryvan/public_html/cms/vendor/ypnos-web/cakephp-datatables/src/Controller/Component/DataTablesComponent.php on line 94

Parse error: syntax error, unexpected '?' in /home/berryvan/public_html/cms/vendor/ypnos-web/cakephp-datatables/src/Controller/Component/DataTablesComponent.php on line 193

I removed them and replaced them with "normal" if statements, and now everything is working as it should. Thought I'd tell you.

ypnos-web commented 8 years ago

This is PHP7 syntax. Actually we have a requirement for PHP7 in the composer.json, did you install the plugin with composer?

In any case please use the php5 branch instead.