Passed
Push — master ( 437a59...f8edb8 )
by Michael
05:10 queued 03:07
created

include/waiting.plugin.php (1 issue)

Labels
Severity
1
<?php
2
3
/**
4
 * @return array
5
 */
6
function b_waiting_xfguestbook()
7
{
8
    /** @var \XoopsMySQLDatabase $xoopsDB */
9
    $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
10
    $block   = [];
11
12
    $result = $xoopsDB->query('SELECT count(*) FROM ' . $xoopsDB->prefix('xfguestbook_msg') . ' WHERE moderate = 1');
13
    if ($result) {
14
        $block['adminlink'] = XOOPS_URL . '/modules/xfguestbook/admin/index.php?action=waiting';
15
        [$block['pendingnum']] = $xoopsDB->fetchRow($result);
0 ignored issues
show
It seems like $result can also be of type true; however, parameter $result of XoopsMySQLDatabase::fetchRow() does only seem to accept mysqli_result, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

15
        [$block['pendingnum']] = $xoopsDB->fetchRow(/** @scrutinizer ignore-type */ $result);
Loading history...
16
        $block['lang_linkname'] = _PI_WAITING_WAITINGS;
17
    }
18
19
    return $block;
20
}
21