File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ public function createTable(): void
270270 $ this ->addTableToSchema ($ schema );
271271
272272 foreach ($ schema ->toSql ($ conn ->getDatabasePlatform ()) as $ sql ) {
273- if (method_exists ($ conn , 'executeStatement ' )) {
273+ if ($ conn instanceof Connection && method_exists ($ conn , 'executeStatement ' )) {
274274 $ conn ->executeStatement ($ sql );
275275 } else {
276276 $ conn ->exec ($ sql );
@@ -300,7 +300,7 @@ public function createTable(): void
300300 throw new \DomainException (sprintf ('Creating the lock table is currently not implemented for platform "%s". ' , $ driver ));
301301 }
302302
303- if (method_exists ($ conn , 'executeStatement ' )) {
303+ if ($ conn instanceof Connection && method_exists ($ conn , 'executeStatement ' )) {
304304 $ conn ->executeStatement ($ sql );
305305 } else {
306306 $ conn ->exec ($ sql );
@@ -331,7 +331,7 @@ private function prune(): void
331331 $ sql = "DELETE FROM $ this ->table WHERE $ this ->expirationCol <= {$ this ->getCurrentTimestampStatement ()}" ;
332332
333333 $ conn = $ this ->getConnection ();
334- if (method_exists ($ conn , 'executeStatement ' )) {
334+ if ($ conn instanceof Connection && method_exists ($ conn , 'executeStatement ' )) {
335335 $ conn ->executeStatement ($ sql );
336336 } else {
337337 $ conn ->exec ($ sql );
You can’t perform that action at this time.
0 commit comments