File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -116,17 +116,17 @@ public function clean(array $conditions)
116116 return [];
117117 }
118118
119- $ stmt = $ this ->pdo ->prepare (implode (' UNION ' , $ unions ));
119+ $ unionSql = implode (' UNION ' , $ unions );
120+ $ stmt = $ this ->pdo ->prepare ($ unionSql );
120121 $ stmt ->execute ($ args );
121122 $ keys = $ stmt ->fetchAll (\PDO ::FETCH_COLUMN , 0 );
122123 if (empty ($ keys )) {
123124 return [];
124125 }
125126
126- $ in = '(? ' . str_repeat (', ? ' , count ($ keys ) - 1 ) . ') ' ;
127127 $ this ->pdo ->exec ('BEGIN ' );
128- $ this ->pdo ->prepare ("DELETE FROM tags WHERE key IN $ in " )->execute ($ keys );
129- $ this ->pdo ->prepare ("DELETE FROM priorities WHERE key IN $ in " )->execute ($ keys );
128+ $ this ->pdo ->prepare ("DELETE FROM tags WHERE key IN ( $ unionSql ) " )->execute ($ args );
129+ $ this ->pdo ->prepare ("DELETE FROM priorities WHERE key IN ( $ unionSql ) " )->execute ($ args );
130130 $ this ->pdo ->exec ('COMMIT ' );
131131
132132 return $ keys ;
You can’t perform that action at this time.
0 commit comments