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.

Comments

berliner created an issue. See original summary.

berliner’s picture

Status: Active » Needs review
StatusFileSize
new959 bytes

Attached patch fixes the warnings for me and should also take care of more possible warnings in this section of the code.

cboyden’s picture

StatusFileSize
new2.19 KB
new1.25 KB

There 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.

dsnopek’s picture

Status: Needs review » Reviewed & tested by the community

This 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 array

shadcn’s picture

Assigned: Unassigned » dsnopek

David, this looks good. Can you commit this please?

  • dsnopek committed feab494 on 7.x-3.x authored by cboyden
    Issue #3005881 by cboyden, berliner: Warnings PHP 7.2
    
dsnopek’s picture

Status: Reviewed & tested by the community » Fixed

Committed! Thanks, Everyone :-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.