There seem not to be anything wrong with the codes you posted. The bug meant be hidden somewhere else probably in your
class config
, because this is the only code that will run when you call ->passed().
private function __construct(){
try {
$this->_pdo = new PDO(
'mysql:host=' . config::get('mysql/host'),
'dbname=' . config::get('mysql/db'),
config::get('mysql/username'),
config::get('mysql/password'));
} catch (PDOException $e){
die($e->getMessage());
}
}