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.
Notice: Trying to access array offset on value of type null in advagg_get_css_aggregate_contents() (line 872 of foo/sites/all/modules/contrib/advagg/advagg.missing.inc).
$ php -v
PHP 7.4.3 (cli) (built: May 26 2020 12:24:22) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
Comment | File | Size | Author |
---|---|---|---|
#9 | fix-array-offset-3153290-9.patch | 2.56 KB | rishabhthakur |
#9 | interdiff_6-9.txt | 3.39 KB | rishabhthakur |
#6 | kevin-utf8.patch | 1.2 KB | Kevin Morse |
#5 | kevin.patch | 2.4 KB | Kevin Morse |
Comments
Comment #2
thallesComment #3
Kevin Morse CreditAttribution: Kevin Morse commentedSo a few lines above, the code checks
if (empty($info_on_files[$cid]['content_hash']))
Since this line isn't throwing any error, I am assuming we could use this same test to see if
$info_on_files[$cid]['content_hash']
is null before doing the test on line 872 that is throwing the Noticeif ($info_on_files[$cid]['content_hash'] !== $file_contents_hash)
Since something that is null is not going to equal the hash of a file. We can probably change the test to be if empty() or the original test.
Thoughts?
Comment #4
rishabhthakur CreditAttribution: rishabhthakur as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #5
Kevin Morse CreditAttribution: Kevin Morse as a volunteer commentedHere is my attempt at a patch.
This also fixes another PHP 7.4 issue that I was having.
Comment #6
Kevin Morse CreditAttribution: Kevin Morse as a volunteer commentedI think my patch was not in utf8 so that's why it couldn't apply?
Comment #7
rishabhthakur CreditAttribution: rishabhthakur as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedhi @kavin Morse
Please let me know if need then i will look on it
Comment #8
rishabhthakur CreditAttribution: rishabhthakur as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedModify @kevin patch with 7.x-2.x-dev branch code and add some coding standard format.
Comment #9
rishabhthakur CreditAttribution: rishabhthakur as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #10
Kevin Morse CreditAttribution: Kevin Morse as a volunteer commentedHi Rishabh,
Thanks for fixing my patch. I have queued up an additional test using PHP 7.4 and MySQL 5.7 since this patch is meant to address a PHP 7.4 issue.
Comment #11
Kevin Morse CreditAttribution: Kevin Morse as a volunteer commentedI have been using this patch in production for a few weeks now with no issue.
Would be great if someone else could also test it.
Comment #12
joaopauloscho CreditAttribution: joaopauloscho at Zoocha commentedThe patch #9 works for me.
Comment #14
thallesComment #15
thallesThanks @all!