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)
116
116
return [];
117
117
}
118
118
119
- $ stmt = $ this ->pdo ->prepare (implode (' UNION ' , $ unions ));
119
+ $ unionSql = implode (' UNION ' , $ unions );
120
+ $ stmt = $ this ->pdo ->prepare ($ unionSql );
120
121
$ stmt ->execute ($ args );
121
122
$ keys = $ stmt ->fetchAll (\PDO ::FETCH_COLUMN , 0 );
122
123
if (empty ($ keys )) {
123
124
return [];
124
125
}
125
126
126
- $ in = '(? ' . str_repeat (', ? ' , count ($ keys ) - 1 ) . ') ' ;
127
127
$ 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 );
130
130
$ this ->pdo ->exec ('COMMIT ' );
131
131
132
132
return $ keys ;
You can’t perform that action at this time.
0 commit comments