Fatal error: Class 'DB\PDO' not found in C:\xampp\vhost\oc2.jasper.lan\httpdocs\system\library\db\mpdo.php on line 9
the class looks as follows
- Code: Select all
namespace DB;
final class mPDO {
private $pdo = null;
private $statement = null;
public function __construct($hostname, $username, $password, $database, $port = "3306") {
try {
$this->pdo = new \PDO("mysql:host=" . $hostname . ";port=" . $port . ";dbname=" . $database, $username, $password, array(PDO::ATTR_PERSISTENT => true));
...
Link to the full class https://github.com/opencart/opencart/blob/master/upload/system/library/db/mpdo.php
the following snipit shows that the Global namespace is being adressed rather then the current namespace DB
- Code: Select all
$this->pdo = new \PDO...
Does anyone know a fix for this ?, I'm thinking this is a misconfig in php.ini