Page MenuHomePhabricator

Warning: count(): Parameter must be an array or an object that implements Countable
Open, Needs TriagePublic

Description

Setup

  • MediaWiki 1.32.1 (3efaceb) 17:46, 11. Apr. 2019
  • PHP 7.2.15-0ubuntu0.18.04.2 (apache2handler)
  • MariaDB 10.1.38-MariaDB-0ubuntu0.18.04.1
  • Page Schemas 0.4.9 (e3a68ae) 20:50, 17. Jan. 2019

Issue

Warning: count(): Parameter must be an array or an object that implements Countable in /../w/extensions/PageSchemas/includes/PageSchemas.classes.php on line 263

Example
See this page.

Event Timeline

Kghbln created this task.Apr 22 2019, 2:25 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 22 2019, 2:25 PM
Anrake added a subscriber: Anrake.Jun 30 2019, 10:07 AM

I'm seeing the same error

Warning: count(): Parameter must be an array or an object that implements Countable in .../extensions/PageSchemas/includes/PageSchemas.classes.php on line 235

MediaWiki 1.32.0
PHP 7.2.19 (cgi-fcgi)
MySQL 5.6.44-86.0
PageSchemas 0.4.9

@Yaron_Koren FYI Not sure if you get to see this by default.

@Kghbln - thanks for including me; no, I didn't see this before. I just checked in what I think is a fix for this.

Kghbln added a comment.Jul 1 2019, 7:33 PM

@Yaron_Koren You are welcome. I just checked out master but the issue still persists.

Ledicat added a subscriber: Ledicat.Jul 9 2019, 5:25 AM

I'm also getting the same error with a new install of 0.4.9
Seems to be when I try and add a section.

Line 263:

if ( count( $returnVals ) != 2 ) {
    continue;
}

Likewise I still see the same.