Skip to content

Fatal error: Access to undeclared static property: DB::$c #3

Description

@banna360

I am using https://github.com/Xeoncross/DByte this PDO wrapper in my code This site was working fine until last day, Now i can a see an error message in the site which is following.

Fatal error: Access to undeclared static property: DB::$c in 
/home/NAME/public_html/TEST/inc/config.php on line 16

My code with line 16 is

require('DB.php');

$pdo = new PDO(
'mysql:dbname=DBNAME;host=localhost',
'DBUSER',
'MYPASSWORD',
 array(
    PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8",
    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,
    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
 )
 );
 DB::$c = $pdo;
 ?>

What will be the issue in line DB::$c = $pdo; i am with this from the after noon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions