The isFieldsEnabled() method in LazyInterface.php is declared like this:

public function isFieldsEnabled(array $image_fields);

The implementation in Lazy.php is this:

public function isFieldsEnabled($image_fields) {

The typehint "array" is missing. This causes issues in PHP 7.1 and earlier resulting in a server error. PHP 7.2 does allow this, but it would be better to make Lazy class compatible with the LazyInterface. Patch will follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Marty2081 created an issue. See original summary.

Marty2081’s picture

Status: Active » Needs review
FileSize
399 bytes

And here is a patch.

Gerben Spil’s picture

Status: Needs review » Reviewed & tested by the community

Prior to patch the staging environment returned a 500 status code and a white screen.
After deploying the patch the staging environment was working again.

  • osman committed 1345288 on 8.x-3.x
    Issue #3089620 by Marty2081: Lazy class method isFieldsEnabled() is not...
osman’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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