Download & Extend

image_style_delete_form doesn't take form_state by reference

Project:Drupal core
Version:7.x-dev
Component:base system
Category:bug report
Priority:major
Assigned:Unassigned
Status:closed (fixed)
Issue tags:7.15 release notes, Novice, PHP 5.4

Issue Summary

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.

Comments

#1

Status:active» needs review

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.

AttachmentSizeStatusTest resultOperations
1614292-1-form_state_by_reference.patch607 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 36,695 pass(es).View details

#2

#3

Status:needs review» reviewed & tested by the community

Looks fine to me. Marking RTBC for assignment.

#4

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

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

#5

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.

#6

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

Committed/pushed to 8.x.

#7

Status:patch (to be ported)» needs review

Easy 7.x backport.

AttachmentSizeStatusTest resultOperations
form_state_by_reference-1614292-7.patch587 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 39,162 pass(es).View details

#8

Status:needs review» reviewed & tested by the community

Looks just like the same thing for 8.x.

#9

Status:reviewed & tested by the community» fixed
Issue tags:+7.15 release notes

Committed to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/8a12512

#10

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?

#11

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

No, Drupal 6 didn't have this function.

#12

Status:fixed» closed (fixed)

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

nobody click here