Skip to content

Fix invalid fetch mode#15

Closed
neopheus wants to merge 6 commits intofilisko:masterfrom
neopheus:Fix-invalid-fetch-mode-in
Closed

Fix invalid fetch mode#15
neopheus wants to merge 6 commits intofilisko:masterfrom
neopheus:Fix-invalid-fetch-mode-in

Conversation

@neopheus
Copy link
Copy Markdown

Hi,

PHP Warning: PDO::query(): SQLSTATE[HY000]: General error: mode must be an integer in ...\vendor\filisko\pdo-plus\src\PDO.php:40

with

$stmt =$this->sut->query("SELECT * FROM users WHERE `name` = 'Filis'");
$data = $stmt->fetchAll(PDO::FETCH_CLASS, "User");

class User
{
    public $name;
    public $surname;
}

this pull request add new phpunit test and fix this problem

@filisko
Copy link
Copy Markdown
Owner

filisko commented Jul 21, 2021

Are you using v3?

@neopheus
Copy link
Copy Markdown
Author

no v4

@filisko filisko closed this in ee32e30 Jul 23, 2021
@filisko
Copy link
Copy Markdown
Owner

filisko commented Jul 23, 2021

thanks! @neopheus !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants