@@ -81,7 +81,11 @@ public function deleteTokenBySeries($series)
8181 $ sql = 'DELETE FROM rememberme_token WHERE series=:series ' ;
8282 $ paramValues = ['series ' => $ series ];
8383 $ paramTypes = ['series ' => \PDO ::PARAM_STR ];
84- $ this ->conn ->executeUpdate ($ sql , $ paramValues , $ paramTypes );
84+ if (method_exists ($ this ->conn , 'executeStatement ' )) {
85+ $ this ->conn ->executeStatement ($ sql , $ paramValues , $ paramTypes );
86+ } else {
87+ $ this ->conn ->executeUpdate ($ sql , $ paramValues , $ paramTypes );
88+ }
8589 }
8690
8791 /**
@@ -101,7 +105,11 @@ public function updateToken($series, $tokenValue, \DateTime $lastUsed)
101105 'lastUsed ' => self ::$ useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE ,
102106 'series ' => \PDO ::PARAM_STR ,
103107 ];
104- $ updated = $ this ->conn ->executeUpdate ($ sql , $ paramValues , $ paramTypes );
108+ if (method_exists ($ this ->conn , 'executeStatement ' )) {
109+ $ updated = $ this ->conn ->executeStatement ($ sql , $ paramValues , $ paramTypes );
110+ } else {
111+ $ updated = $ this ->conn ->executeUpdate ($ sql , $ paramValues , $ paramTypes );
112+ }
105113 if ($ updated < 1 ) {
106114 throw new TokenNotFoundException ('No token found. ' );
107115 }
@@ -129,6 +137,10 @@ public function createNewToken(PersistentTokenInterface $token)
129137 'value ' => \PDO ::PARAM_STR ,
130138 'lastUsed ' => self ::$ useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE ,
131139 ];
132- $ this ->conn ->executeUpdate ($ sql , $ paramValues , $ paramTypes );
140+ if (method_exists ($ this ->conn , 'executeStatement ' )) {
141+ $ this ->conn ->executeStatement ($ sql , $ paramValues , $ paramTypes );
142+ } else {
143+ $ this ->conn ->executeUpdate ($ sql , $ paramValues , $ paramTypes );
144+ }
133145 }
134146}
0 commit comments