Hi,

Manage tab page (admin/structure/features) appears to be broken, with PHP7 while it works fine with PHP 5.6.14

See attached images.

I did manage to create a new feature with PHP7 and view it on the Manage tab when back to PHP 5.6.14

I have not met yet similar issues on other admin forms.

Any idea what could be that specific in features_admin_form() ?

Regards,

Alexandre

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

w3wfr created an issue. See original summary.

Yerwol’s picture

I'm seeing the exact same issue. Both running Ondrej's versions of PHP for Trusty.

sergeypavlenko’s picture

HI, all

File: features.admin.inc
Line: 1126

// As of 7.0 beta 2 it matters where the "vertical_tabs" element lives on the
// the array. We add it late, but at the beginning of the array because that
// keeps us away from trouble.
$form = array('packages' => array('#type' => 'vertical_tabs')) + $form;

If a line with $form is deleted. The form works.

MrHaroldA’s picture

Version: 7.x-2.7 » 7.x-2.x-dev
Status: Active » Needs review
FileSize
636 bytes

A simple dpm() of the resulting $form array showed that the 'packages' array was added as last item. The description clearly shows that it should be the first item in the $form array.

Changing the array() + $form into an array_merge() fixes this.

sergeypavlenko’s picture

Status: Needs review » Reviewed & tested by the community

Nice! Works good. Go to RTBC. Thanks!

MrHaroldA’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
Parent issue: » #2288395: Manage Features page empty in PHP 7

My patch is exactly the same as in #2288395: Manage Features page empty in PHP 7 ;) While funny, it's also a duplicate ...