Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
class EntityCollectionStyleHierarchyLimited method build()
is using an arbitrary expression which was introduced in PHP 5.5. Therefore the plugin lacks PHP 5.4 support.
if ( !empty($limitation = $this->getLimits()) ) {}
I know that PHP 5.4 is for long time EOL, but I think for Drupal 7 modules it needs to be considered till it's own end of life, as there are too much running PHP 5.4 environments in the world.
Proposed resolution
Save the result in the variable first and and then process the empty check.
Comment | File | Size | Author |
---|---|---|---|
#2 | entity_collection-hierarchy_limited_plugin_not_php54_compatible-2719393-2.patch | 736 bytes | szeidler |
Comments
Comment #2
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedThe attached patch solves it.
Comment #3
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedComment #4
esolitosTo be committed!
Comment #6
esolitos