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.
I added a new Field to a Content Type and as soon I try to edit it, I will get the following error:
PHP Fatal error: Declaration of Drupal\\Core\\TypedData\\ComputedItemListTrait::getValue() must be compatible with Drupal\\Core\\Field\\FieldItemList::getValue($include_computed = false) in /home/Projekte/php/web/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php on line 13
Comments
Comment #2
cilefen CreditAttribution: cilefen as a volunteer commentedThe only change is moving to PHP 7.2?
Comment #3
cilefen CreditAttribution: cilefen as a volunteer commentedIs this a duplicate?
Comment #4
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedYup, it is.
Comment #5
cburschkaSee https://www.drupal.org/project/drupal/issues/2923015
PHP 7.2.0 enforces some type checks that it used to ignore previously, so Drupal does not run in PHP 7.2+. (See https://www.drupal.org/docs/8/system-requirements/php)
(It's possible this may not be fixed in a patch release in 8.4.x, which would mean Drupal won't support PHP 7.2.0 until 8.5.0.)
Comment #6
remyyyyyTo fix the issue in drupal 8.4.x add this function on top of the class PathFieldItemList just after the line 15 into the file core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php