In php versions < 5.3 adding an array to a non array can cause trouble. We've seen this in the machine_name_field_widget_form function. $element is empty so

$element['value'] = $element;
$element['value'] += array(

causes the page to fail.
This can be easily fixed with a simple cast to an array.

CommentFileSizeAuthor
#2 machine_name-fatal-error-1847006-2.patch668 byteslliss

Comments

lliss’s picture

The actual error returned is:

Unsupported operand types in ***/machine_name/machine_name.module on line 51

lliss’s picture

Status: Needs work » Needs review
StatusFileSize
new668 bytes

The attached patch should solve this issue.

ducktape’s picture

Status: Needs review » Reviewed & tested by the community

That fixed it for me, thanks!

sproets’s picture

Yep, fixed it for me to!
Super!

c-logemann’s picture

Ok, thank you for testing. I am very busy at moment but I try to commit the patch as soon as possible.

c-logemann’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Reviewed & tested by the community » Fixed
dww’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Status: Fixed » Reviewed & tested by the community

So long as we have two branches (boo), we need this commit (and every other bug fix) in the 7.x-1.x branch, too. See #1952404-5: Support devel_generate for machine_name fields for why I think we should just merge 7.x-2.x back into 7.x-1.x and (for now) abandon work on 7.x-2.x.

Thanks,
-Derek

dww’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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