From d362774d181a530259071db7a11a0eda1dfd6e2b Mon Sep 17 00:00:00 2001 From: Peter Gnodde Date: Wed, 9 May 2018 21:49:50 +0200 Subject: [PATCH] Replace deprecated create_function calls (#12) --- include/display_collections.inc.php | 5 ++++- include/events.inc.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/display_collections.inc.php b/include/display_collections.inc.php index 117c784..2b2c2ac 100644 --- a/include/display_collections.inc.php +++ b/include/display_collections.inc.php @@ -67,7 +67,10 @@ // collections details if ($page['total_categories']) { - $categories_id = array_map(create_function('$c', 'return $c["id"];'), $categories); + $categories_id = array(); + foreach ($categories as $category) { + $categories_id[] = $category['id']; + } $query = ' SELECT * FROM ( diff --git a/include/events.inc.php b/include/events.inc.php index 41ff56b..25c7d07 100644 --- a/include/events.inc.php +++ b/include/events.inc.php @@ -91,7 +91,10 @@ function user_collections_thumbnails_list($tpl_thumbnails_var, $pictures) return $tpl_thumbnails_var; } - $image_ids = array_map(create_function('$i', 'return $i["id"];'), $pictures); + $image_ids = array(); + foreach ($pictures as $picture) { + $image_ids[] = $picture['id']; + } // get collections for each picture $query = '