Static function Query::connect() should not be abstract

Static function Query::connect() should not be abstract

alf007alf007 Posts: 37Questions: 15Answers: 0

Error messages shown:
Strict standards: Static function DataTables\Database\Query::connect() should not be abstract
lib\Database\Query.php on line 182

Description of problem:
When I load my data from the MySQL server I got this error, the JSON response it's correct but the PHP warning shows up.

Could you please tell me how to fix this?

Apache Version: 2.4.51
PHP Version: 5.6.40
Datatables Editor version: 2.0.7

This question has an accepted answers - jump to answer


  • allanallan Posts: 60,962Questions: 1Answers: 9,939 Site admin
    Answer ✓

    The funny thing is, it actually should be abstract since the method is implemented by the drivers and not in that file (it just defines the signature). This is the line in question. It was modified slightly in this commit to conform to standards better.

    The best way to fix this is to update PHP on your server since 5.6 was end of life in 2018. Assuming that isn't possible, use the PHP libraries from the 2.0.6 release which didn't have that change, or disable strict mode.


Sign In or Register to comment.