Skip to content

If there are no comments, pages.php will crash #27

@ruthenoid

Description

@ruthenoid

For your consideration:

For an old site to run again, I had to change the line 241 in pageDashboard() in pages.php
from:
$latestcomments = array_merge($modcomments, $latestcomments);
to:
$latestcomments = array_merge((array)$modcomments, (array)$latestcomments);

0 comments might create an issue there.

Also, I had to change lib.php line 4841 in displayQueryLog()
from:
if ($PIVOTX['config']->get('log_queries') && (count($GLOBALS['query_log']) > 0)) {
to:
if ($PIVOTX['config']->get('log_queries') && is_array($GLOBALS['query_log']) && (count($GLOBALS['query_log']) > 0)) {

I guess count(null) throws an error now. Might be only related to the Debug feature enabled.

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