-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Given some example function like this:
function countRows(string $table, string $column = Null, string $value = Null) {
global $sql;
if (!empty($column) && !empty($value)) {
$count = $sql->executeQuery("SELECT COUNT(*) as total FROM $table WHERE $column = ?", [$value]);
} else {
$count = $sql->executeQuery("SELECT COUNT(*) as total FROM $table");
}
$count = $count->fetch_assoc();
return $count['total'];
}Intellisense complains about $count = $count->fetch_assoc(); saying $count is void.
Expected type 'object'. Found 'void'.intelephense(P1006)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working