Fixed bugs!

This commit is contained in:
James Cole
2014-12-15 18:16:48 +01:00
parent f9ab49911d
commit 16678aa5e1
4 changed files with 12 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ class Form
*
* @return mixed
*/
public function makeSelectList(Collection $set, $titleField = null, $addEmpty = false)
public function makeSelectList(Collection $set, $addEmpty = false)
{
$selectList = [];
if ($addEmpty) {
@@ -32,7 +32,7 @@ class Form
foreach ($set as $entry) {
/** @noinspection PhpUndefinedFieldInspection */
$id = intval($entry->id);
$title = $titleField;
$title = null;
foreach ($fields as $field) {
if (is_null($title) && isset($entry->$field)) {