According to PHP manual for PDO :: query
PDO :: query () returns a PDOStatement or FALSE object on failure.
It looks like your query is not working (on line 33) and thus returns BOOLEAN (false), probably because at that point in time the PDO did not connect to the database, which contains a table called article . In the connect () method, I see that it is trying to connect to a db called 'generatordatabase'; make sure that this connection is completed before calling createTable (); otherwise, make sure that it contains a table called "article".
I would recommend adding a few more code examples, for example code that calls this class / method before the error runs.
source share