Page MenuHomePhabricator

count(): Parameter must be an array or an object that implements Countable in Flow/includes/TemplateHelper.php
Closed, ResolvedPublicBUG REPORT

Description

I saw my server log show:

Warning:  count(): Parameter must be an array or an object that implements Countable in extensions/Flow/includes/TemplateHelper.php:322
PHP   1. {main}() index.php:0
PHP   2. MediaWiki->run() index.php:42
PHP   3. MediaWiki->main() includes/MediaWiki.php:524
PHP   4. MediaWiki->performRequest() includes/MediaWiki.php:861
PHP   5. MediaWiki->performRequest() includes/MediaWiki.php:294
PHP   6. Flow\Actions\FlowAction->show() includes/MediaWiki.php:500
PHP   7. Flow\Actions\FlowAction->showForAction() extensions/Flow/includes/Actions/Action.php:50
PHP   8. Flow\View->show() extensions/Flow/includes/Actions/Action.php:112
PHP   9. Flow\View->renderApiResponse() extensions/Flow/includes/View.php:81
PHP  10. Flow\TemplateHelper->Flow\{closure}() extensions/Flow/includes/View.php:355
PHP  11. Flow\TemplateHelper->{closure:extensions/Flow/handlebars/compiled/flow_block_loop.handlebars.php:1-29}() extensions/Flow/includes/TemplateHelper.php:113
PHP  12. LCRun3::sec() extensions/Flow/handlebars/compiled/flow_block_loop.handlebars.php:26
PHP  13. Flow\TemplateHelper->{closure:extensions/Flow/handlebars/compiled/flow_block_loop.handlebars.php:25-26}() vendor/zordius/lightncandy/src/lightncandy.php:2485
PHP  14. LCRun3::ch() extensions/Flow/handlebars/compiled/flow_block_loop.handlebars.php:25
PHP  15. Flow\TemplateHelper::block() vendor/zordius/lightncandy/src/lightncandy.php:2602
PHP  16. Flow\TemplateHelper::processTemplate() extensions/Flow/includes/TemplateHelper.php:302
PHP  17. call_user_func:{extensions/Flow/includes/TemplateHelper.php:187}() extensions/Flow/includes/TemplateHelper.php:187
PHP  18. Flow\TemplateHelper->Flow\{closure}() extensions/Flow/includes/TemplateHelper.php:187
PHP  19. Flow\TemplateHelper->{closure:extensions/Flow/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php:1-243}() extensions/Flow/includes/TemplateHelper.php:113
PHP  20. LCRun3::hbch() extensions/Flow/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php:241
PHP  21. Flow\TemplateHelper::eachPost() vendor/zordius/lightncandy/src/lightncandy.php:2718
PHP  22. count() extensions/Flow/includes/TemplateHelper.php:322

I using MW 1.31 and PHP 7.2.10. I think this issue also includes in master. P.S. PHPUnit test can't find it.

Event Timeline

Restricted Application added a project: Growth-Team. · View Herald TranscriptOct 20 2018, 6:09 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
RazeSoldier updated the task description. (Show Details)Oct 20 2018, 6:10 PM
RazeSoldier updated the task description. (Show Details)

Change 468782 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/Flow@master] Fix countable PHP 7.2 error in Flow

https://gerrit.wikimedia.org/r/468782

Change 468793 had a related patch set uploaded (by Reedy; owner: Alangi Derick):
[mediawiki/extensions/Flow@REL1_32] Fix countable PHP 7.2 error in Flow

https://gerrit.wikimedia.org/r/468793

Change 468794 had a related patch set uploaded (by Reedy; owner: Alangi Derick):
[mediawiki/extensions/Flow@REL1_31] Fix countable PHP 7.2 error in Flow

https://gerrit.wikimedia.org/r/468794

Change 468795 had a related patch set uploaded (by Reedy; owner: Alangi Derick):
[mediawiki/extensions/Flow@REL1_30] Fix countable PHP 7.2 error in Flow

https://gerrit.wikimedia.org/r/468795

Change 468782 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Fix countable PHP 7.2 error in Flow

https://gerrit.wikimedia.org/r/468782

xSavitar closed this task as Resolved.Oct 21 2018, 10:37 AM
xSavitar claimed this task.

Change 468794 merged by Umherirrender:
[mediawiki/extensions/Flow@REL1_31] Fix countable PHP 7.2 error in Flow

https://gerrit.wikimedia.org/r/468794

Change 468795 merged by Umherirrender:
[mediawiki/extensions/Flow@REL1_30] Fix countable PHP 7.2 error in Flow

https://gerrit.wikimedia.org/r/468795

Change 468793 merged by Umherirrender:
[mediawiki/extensions/Flow@REL1_32] Fix countable PHP 7.2 error in Flow

https://gerrit.wikimedia.org/r/468793