We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a18506 commit cc3aa58Copy full SHA for cc3aa58
Snippets/Snippets.API.php
@@ -205,6 +205,11 @@ public static function load_by_id($id, $user_id) {
205
206
if (is_array($id)) {
207
$ids = array_filter($id, "is_int");
208
+
209
+ if (count($ids) < 1) {
210
+ return array();
211
+ }
212
213
$ids = implode(",", $ids);
214
215
$query = "SELECT * FROM {$snippet_table} WHERE id IN ({$ids}) AND user_id=".db_param();
@@ -269,6 +274,11 @@ public static function delete_by_id($id, $user_id) {
269
274
270
275
271
276
277
278
279
+ return;
280
281
272
282
273
283
284
$query = "DELETE FROM {$snippet_table} WHERE id IN ({$ids}) AND user_id=".db_param();
0 commit comments