Forum

Thread tagged as: Error, Runway

Very small error/warning in Runway v3.1

It's a small issue, but after upgrading to v3.1 (Runway), debug is showing the following runtime warning when an admin edit page has a category field:

[type] => 2
    [message] => count(): Parameter must be an array or an object that implements Countable
    [file] => /filepath../perch/core/lib/PerchFieldTypes.class.php
    [line] => 43
Duncan Revell

Duncan Revell 78 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I can't for the life of me reproduce that, but I'll add an extra check all the same.

Duncan Revell

Duncan Revell 78 points
Registered Developer

Ah, I just did a quick Google (I neglected to do so beforehand) - seems to crop up a lot with PHP 7.2.

I'm on PHP 7.2.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ah, good call. Most count() calls go through PerchUtil::count(), which should protect against this. That was a rare one which didn't.