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
I'm getting the PHP notice from some of my drupal 7 web pages 'Notice: Trying to access array offset on value of type null in _cdn_build_css_path() (line 146 of ../cdn/cdn.basic.css.inc)'.
PHP Version : 7.4.15
Issue fork cdn-3201566
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
akhilavnairComment #5
Wim LeersLooks like this MR is causing tests to fail:
Did you investigate? 😊
I bet this is a PHP 7.4 compatibility thing.
Comment #6
akhilavnairHi Wim Leers,
Yeah this is a PHP compatibility issue.
Comment #7
Wim LeersThanks for confirming 😊
Could you please improve the merge request so it doesn't cause tests to fail? Looks like the cure is worse than the disease right now 😅
Comment #8
nicolabeghin CreditAttribution: nicolabeghin commentedAny update on this?
Comment #9
Wim LeersThe merge request is not passing tests due to this change. Which means this is a net regression.
That being said; I'm queuing an explicit test against PHP 7.4, which this issue is aiming to improve compatibility with. It just can't come at the cost of PHP 7.0 compatibility.
Comment #10
Olarin CreditAttribution: Olarin at Kosada commentedBased on my local testing, it seems that particular test is already failing WITHOUT the above change, suggesting it is not related. (Which would make sense, because it's hard to see how the minimal change in question - checking isset on a variable before using it, and using an empty string instead if it's not set - could cause such a test regression.)
Comment #11
Wim LeersD'oh of course — mea culpa! 🙈 I should've checked https://www.drupal.org/pift-ci-job/2186474, that has the exact same failure indeed. Merging!
Comment #12
Wim LeersComment #14
Wim LeersComment #16
Anaconda777 CreditAttribution: Anaconda777 as a volunteer commentedHi,
I have 7.x-2.10 version and getting this error with PHP 7.4.30.
Please let me know how can I fix my version? I know how to patch with composer,
but this issue seems to have no patch, even it is fixed?
Comment #17
Wim LeersSorry, I have not shipped a release yet since this was committed. If you want to fix right now, install the latest development snapshot. My apologies!