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.
_drupal_build_css_path()
is being called with first parameter equal to NULL, but then it is used as an array.
$path = $_base . $matches[1];
This causes a notice, in PHP 7.4.
Trying to use values of type null, bool, int, float or resource as an array (such as $null["key"]) will now generate a notice.
Comments
Comment #2
Taran2LComment #3
Taran2LComment #4
apadernoComment #5
apadernoComment #6
apadernoComment #7
hash6 CreditAttribution: hash6 at QED42 commentedComment #8
izmeez CreditAttribution: izmeez commentedPatch in #6 applies and resolves warnings.
Comment #9
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedMinor nit-pick about this line is that I think according to the coding standards for operators we should have a space on either side of the
:
here:Otherwise the patch fixes the notice and preserves existing functionality, so once that's addressed this should be RTBC.
Comment #10
mcdruid@Steven Jones is right about the missing space, but we can fix #6 on commit.
This function doesn't exist in D8 so there's no fix there to backport.
Comment #11
Fabianx CreditAttribution: Fabianx at Tag1 Consulting commentedApproved, let's get this in and fix the typo on commit.
Comment #13
mcdruidI fixed the whitespace on commit per #9.
Thanks everyone!