fixed array_map over iterable

This commit is contained in:
Rudi Grinberg 2012-09-12 11:54:37 -04:00
parent f47593575c
commit 6519512924
1 changed files with 4 additions and 4 deletions

View File

@ -136,10 +136,10 @@ class Application_Model_Show
$hosts = Application_Common_Database::prepareAndExecute( $sql,
array( ':show_id' => $this->getId() ), 'all');
$res = array_map( function($host) {
return $host['first_name']." ".$host['last_name'];
}, $hosts);
$res = array();
foreach ($hosts as $host) {
$res[] = $host['first_name']." ".$host['last_name'];
}
return $res;
}