Problem

Image style tests have a failure deleting styles in PHP 5.4. If you have a ubuntu 12.04 LTS system this is pretty easy to reproduce.

Proposed resolution

PHP 5.4 seems to be more strict about taking arguments by reference. Since image_style_delete_form doesn't take $form_state by reference, the style isn't passed to the submit function and the style can't be deleted.

The fix is pretty simple, we just have to add a & in front of $form_state so I'm going to mark this novice.

Remaining tasks

A patch.

User interface changes

Just a bug fix.

API changes

Just a bug fix.

Files: 
CommentFileSizeAuthor
#7 form_state_by_reference-1614292-7.patch587 bytesAlbert Volkman
PASSED: [[SimpleTest]]: [MySQL] 39,162 pass(es). View
#1 1614292-1-form_state_by_reference.patch607 bytesbrockjo
PASSED: [[SimpleTest]]: [MySQL] 36,695 pass(es). View

Comments

brockjo’s picture

Status: Active » Needs review
FileSize
607 bytes
PASSED: [[SimpleTest]]: [MySQL] 36,695 pass(es). View

Tested this on my test setup: Ubuntu 12.04 LTS, Drupal 8.x, PHP 5.4.3, which results in no errors when deleting style. This should be reviewed though.

catch’s picture

Issue tags: +needs backport to D7, +PHP 5.4
skottler’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine to me. Marking RTBC for assignment.

Dries’s picture

Version: 8.x-dev » 7.x-dev

Committed to 8.x. Thanks. Moving to 7.x.

David_Rothstein’s picture

Version: 7.x-dev » 8.x-dev

This and several other issues look like they weren't actually committed/pushed. So, #1 is still RTBC for Drupal 8.

catch’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed/pushed to 8.x.

Albert Volkman’s picture

Status: Patch (to be ported) » Needs review
FileSize
587 bytes
PASSED: [[SimpleTest]]: [MySQL] 39,162 pass(es). View

Easy 7.x backport.

Niklas Fiekas’s picture

Status: Needs review » Reviewed & tested by the community

Looks just like the same thing for 8.x.

David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +7.15 release notes
Albert Volkman’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Active
Issue tags: -needs backport to D7 +needs backport to D6

Should this be backported to 6 as well?

neclimdul’s picture

Version: 6.x-dev » 7.x-dev
Status: Active » Fixed
Issue tags: -needs backport to D6

No, Drupal 6 didn't have this function.

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