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 @@ -272,7 +272,7 @@ public function createTable(): void
272
272
$ this ->addTableToSchema ($ schema );
273
273
274
274
foreach ($ schema ->toSql ($ conn ->getDatabasePlatform ()) as $ sql ) {
275
- if (method_exists ($ conn , 'executeStatement ' )) {
275
+ if ($ conn instanceof Connection && method_exists ($ conn , 'executeStatement ' )) {
276
276
$ conn ->executeStatement ($ sql );
277
277
} else {
278
278
$ conn ->exec ($ sql );
@@ -302,7 +302,7 @@ public function createTable(): void
302
302
throw new \DomainException (sprintf ('Creating the lock table is currently not implemented for PDO driver "%s". ' , $ driver ));
303
303
}
304
304
305
- if (method_exists ($ conn , 'executeStatement ' )) {
305
+ if ($ conn instanceof Connection && method_exists ($ conn , 'executeStatement ' )) {
306
306
$ conn ->executeStatement ($ sql );
307
307
} else {
308
308
$ conn ->exec ($ sql );
@@ -333,7 +333,7 @@ private function prune(): void
333
333
$ sql = "DELETE FROM $ this ->table WHERE $ this ->expirationCol <= {$ this ->getCurrentTimestampStatement ()}" ;
334
334
335
335
$ conn = $ this ->getConnection ();
336
- if (method_exists ($ conn , 'executeStatement ' )) {
336
+ if ($ conn instanceof Connection && method_exists ($ conn , 'executeStatement ' )) {
337
337
$ conn ->executeStatement ($ sql );
338
338
} else {
339
339
$ conn ->exec ($ sql );
You can’t perform that action at this time.
0 commit comments