I'm seeing these warnings when using PHP 7.2:
Warning: count(): Parameter must be an array or an object that implements Countable in radix_table() (line 51 of /srv/www/html/build/html/sites/all/themes/contrib/radix/includes/structure.inc).
I'll provide a patch to address these.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | interdiff-2-3.txt | 1.25 KB | cboyden |
| #3 | 3005881-prevent-warnings-php72-3.patch | 2.19 KB | cboyden |
| #2 | 3005881-prevent-warnings-php72.patch | 959 bytes | berliner |
Comments
Comment #2
berliner commentedAttached patch fixes the warnings for me and should also take care of more possible warnings in this section of the code.
Comment #3
cboyden commentedThere are some other places in theme.inc where count is being called on incoming $variables that might not be arrays. I've patched this file using the same approach as @berliner.
Comment #4
dsnopekThis patch looks good to me! With @cboyden's additions, I think this addresses all instances of
count()where the type isn't sure to be an arrayComment #5
shadcn commentedDavid, this looks good. Can you commit this please?
Comment #7
dsnopekCommitted! Thanks, Everyone :-)