panique / mini3

Just an extremely simple naked PHP application, useful for small projects and quick prototypes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fatal error: Uncaught Error: Class 'Mini\Model\PDO' not found in

juniorbatistadev opened this issue · comments

When I use $query->fetchAll(PDO::FETCH_ASSOC) it show this error Fatal error: Uncaught Error: Class 'Mini\Model\PDO' not found ... thats the only thing i changed in the framework

commented

Hi, what happens when you NOT change it ?

everything was fine when I didn't change anything. any way in the comments of the song model say I can set the default to PDO:FETCH_ASSOC in core/controller but that file doesn't exist, I ended up finding the settings in core/model

You may need to change the use PDO to use \PDO in one or more places, just FYI. Not sure exactly why that's happening, but I get it on some of my sites, too.

After the above change even i'm getting error

Fatal error: Class 'admin\Model\PDO' not found in E:\php\admin\application\Model\admin.php on line 28