BUGFIX: Don't try to set the title if it hasn't been set for us.

This enables the new code to pass the existing tests.
This commit is contained in:
Fred Condo 2012-03-09 11:14:06 -08:00
parent 595a6dc333
commit 594448499b

View File

@ -267,10 +267,7 @@ class FieldList extends ArrayList {
if(is_a($parentPointer, 'TabSet')) {
// use $title on the innermost tab only
if ($k == $last_idx) {
if (!isset($title)) {
$title = $part;
}
$currentPointer = new Tab($part, $title);
$currentPointer = isset($title) ? new Tab($part, $title) : new Tab($part);
}
else {
$currentPointer = new TabSet($part);