Skip to content

New Warnings with PHP 7.2 RC #540

@q2apro

Description

@q2apro

Just tried the new version, you will get:

  1. Warning

PHP Warning: count(): Parameter must be an array or an object that implements Countable in qa-theme-base.php on line 211

Line: if (count(@$this->content['widgets'][$region][$place])) {

https://github.com/q2a/question2answer/blob/dev/qa-include/qa-theme-base.php#L211

  1. Warning

PHP Warning: count(): Parameter must be an array or an object that implements Countable in page.php

Line: $lastcategoryid = count($categoryids) ? end($categoryids) : null;

$lastcategoryid = count($categoryids) ? end($categoryids) : null;

--

Fix is to check before if(isset(...))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions