We are currently using php 5.3 in some occasions and the submodule cacheflush_advanced breaks our site because in cacheflush_advanced.module at line 56 the array returned by the explode function is accessed directly and this type of notation is available only since PHP 5.4.

<?php
$remove_id = explode('advanced_remove_', $form_state['clicked_button']['#name'])[1];
?>

You can see it also in the automated tests: https://qa.drupal.org/pifr/test/1032823

Comments

esolitos created an issue. See original summary.

esolitos’s picture

Status: Active » Needs review
StatusFileSize
new3.02 KB

Looking at the code i could find the same issue in multiple places, I have attached a patch for this issue.

balintcsaba’s picture

Hi esolitos,

Thanks for the patch.
This module was developed with minimum requirement 5.4 but after your report I made a little research and I realized that PHP 5.3 still the most used version of PHP.
So I will commit soon the patch.

Thanks

balintcsaba’s picture

Category: Bug report » Feature request
Status: Needs review » Patch (to be ported)

balintcsaba’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Needs work

The last submitted patch, 2: cacheflush-php53-compatibility-2568079-2-7.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: cacheflush-php53-compatibility-2568079-2-7.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: cacheflush-php53-compatibility-2568079-2-7.patch, failed testing.

  • balintcsaba committed 91d43d5 on 7.x-3.x
    Revert "Issue #2568079 by esolitos: Support for PHP...

Status: Needs work » Needs review

balintcsaba’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

balintcsaba’s picture

Status: Closed (fixed) » Needs work

Remove hook_requirements, is no longer needed.

balintcsaba’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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