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.
Comment | File | Size | Author |
---|---|---|---|
#7 | form_state_by_reference-1614292-7.patch | 587 bytes | Albert Volkman |
#1 | 1614292-1-form_state_by_reference.patch | 607 bytes | brockjo |
Comments
Comment #1
brockjo CreditAttribution: brockjo commentedTested 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.
Comment #2
catchComment #3
skottler CreditAttribution: skottler commentedLooks fine to me. Marking RTBC for assignment.
Comment #4
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks. Moving to 7.x.
Comment #5
David_Rothstein CreditAttribution: David_Rothstein commentedThis and several other issues look like they weren't actually committed/pushed. So, #1 is still RTBC for Drupal 8.
Comment #6
catchCommitted/pushed to 8.x.
Comment #7
Albert Volkman CreditAttribution: Albert Volkman commentedEasy 7.x backport.
Comment #8
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedLooks just like the same thing for 8.x.
Comment #9
David_Rothstein CreditAttribution: David_Rothstein commentedCommitted to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/8a12512
Comment #10
Albert Volkman CreditAttribution: Albert Volkman commentedShould this be backported to 6 as well?
Comment #11
neclimdulNo, Drupal 6 didn't have this function.