Skip to content

Commit

Permalink
Replace deprecated create_function calls (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoddep authored and mistic100 committed May 9, 2018
1 parent 52c2329 commit d362774
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion include/display_collections.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
5 changes: 4 additions & 1 deletion include/events.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '
Expand Down

0 comments on commit d362774

Please sign in to comment.