gkrid / dokuwiki-plugin-approve

GNU General Public License v2.0
4 stars 17 forks source link

php warning in helper.php #43

Closed mtkirchner closed 1 year ago

mtkirchner commented 1 year ago

I get the php warning: PHP Warning: Trying to access array offset on value of type bool in /.../htdocs/igfwiki/lib/plugins/approve/helper.php on line 51

code is

        $res = $sqlite->query('SELECT page, approver FROM page WHERE page=? AND hidden=0', $id);
        $row = $sqlite->res2row($res);
51:     $approver = $row['approver'];
        if ($row) {
            return true;
        }
        return false;

So I guess that line 51 should be put into the brackets as it is only valid if $row is not false.

solewniczak commented 1 year ago

fixed in c0f5b8e8955d46b6eceab9ac7ccb930421713568