Attempting to use picture module 2.x on a server (unfortunately) still running PHP 5.2.17 produces the following syntax-related error:
Error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in modules/contrib/picture/picture.module, line 1388

I'm very much aware that PHP 5.2 is end-of-life, but it is still out there, and technically meets Drupal 7's minimum requirements. If making picture 2.x compatible is not desired or feasible (which would be completely understandable), can we at least add that PHP 5.3+ is required for 2.x on the project page and Readme?

Comments

attiks’s picture

Can you try changing the line to

if (!PictureMapping::isEmptyMappingDefinition($mapping_definition)) {
tannerjfco’s picture

Sorry for the delay, but I tested this on our environment with PHP 5.2.17 and it does seem to resolve the issue. I haven't tested the module thoroughly but it does install and seem to function with this change.

  • Jelle_S committed 2de3ab6 on 7.x-2.x
    Issue #2303711 by tannerjfco: Php 5.2 compatibility.
    
jelle_s’s picture

Status: Active » Fixed

Fixed in latest dev.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

kliker’s picture

Category: Support request » Bug report
Status: Closed (fixed) » Needs work

I just tried updating to latest dev from 7.x-1.x. on PHP 5.2.17.

When I initiated database update I received an error message:

$drush updb
The following updates are pending:

picture module :
7200 - Update from 7.x-1.x.
7201 - Update to the new file display formatter provided by file_entity.module.
7202 - Update field formatters to the new colorbox settings.
7203 - Update ckeditor settings to the new plugin path.

Do you wish to run all pending updates? (y/n): y

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /usr/www/users/petosevi/drupal7.sites/sites/all/modules/picture/includes/PictureMapping.php, line 194
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in
/usr/www/users/petosevi/drupal7.sites/sites/all/modules/picture/includes/PictureMapping.php, line 194

Anonymous’s picture

I’ve the same Error w/ the new update :-)

[05-Sep-2014 10:43:44] PHP Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /Websites/drupal.dev/sites/all/modules/picture/includes/PictureMapping.php on line 194

Cache was cleared. 5.2 is the server config of a clients server :-(

  • attiks committed d4d92a8 on 7.x-2.x
    Issue #2303711 by tannerjfco: Fixed php 5.2 compatibility.
    
attiks’s picture

Fixed in 7.x-2.7, should be available soon

attiks’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.