Attempt to upgrade from ver 1.4 to 1.5-beta1 with "drush up insert-1.5-beta1" fails with errors
Error: Arrays are not allowed as constants in /insert.module, line 18
PHP Fatal error: Arrays are not allowed as constants in /insert.module on line 18Fatal error: Arrays are not allowed as constants in /insert.module on line 18
Not sure which commit introduced this.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | insert-3009874-constants.patch | 2.93 KB | snater |
Comments
Comment #2
izmeez commentedComment #3
snater commentedThanks for opening the ticket. Which PHP version are you using? It seems you are still using a version prior to 5.6, which introduced allowing arrays as constants.
Comment #4
snater commentedThe attached patch should ensure compatibility to PHP 5.4. But there might be additional conflicts, so it would be great if someone tested the change. I am aware that there are changes that are not compatible with PHP < 5.4. While Drupal 7 has a minimum requirement of PHP 5.2.5, 5.4 is the recommended minimum. Not sure, we really need to support PHP < 5.4. 5.6's end of life will be at the end of this year.
Comment #6
snater commentedComment #7
izmeez commentedI am using different versions of php on servers and yes, this occurred on server with php 5.4.x
The fix resolves the issue. Thank you.