Closed (fixed)
Project:
Drupal core
Version:
9.0.x-dev
Component:
layout_builder.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Jul 2018 at 06:30 UTC
Updated:
17 Feb 2020 at 16:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #4
jdleonardNote that the patch in #3038981: Inline blocks missing section delta extra data on filtered block definitions adds an analogous cast in function inlineBlockList() of the same class.
Comment #5
tim.plunkettTagging
Comment #7
falco010Just tested and debugged this, dynamic route parameters always are a string.
Even after trying to add the Regular Expression on the route parameter, still receive it as a string.
As @tim.plunkett mentioned earlier in:
https://www.drupal.org/project/drupal/issues/2973615
This would be the solution, but it does not work for PHP 5.
However, the official documentation is stating that we don't support PHP 5.x anymore:
https://www.drupal.org/docs/8/system-requirements/php-requirements
So attaching a patch for the integer casting in the parameters of the functions.
Comment #8
tbsiqueiraTested, it is working fine, the delta is now one integer.
Comment #9
tim.plunkettUnfortunately, this is a BC-breaking change in versions before PHP 7.2, which means it won't be allowed in Drupal 8.
https://3v4l.org/kRYDG
The good news is that Drupal 9 requires PHP 7.2, so this sort of change can safely be made!
See https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters
I'm not sure if there's a D8 safe fix available, or what the current policy is for D9 only fixes. But leaving this at RTBC for now.
Comment #11
catchCommitted 7acaffe and pushed to 9.0.x. Thanks!