Tidy up from #1219

This commit is contained in:
Samuel Georges 2015-06-18 18:46:03 +10:00
parent 040b2dbb71
commit e71025de09
1 changed files with 4 additions and 1 deletions

View File

@ -118,7 +118,10 @@ class FormTabs implements IteratorAggregate, ArrayAccess
if ($fieldName == $name) {
unset($this->fields[$tab][$fieldName]);
if (!sizeof($this->fields[$tab])) {
/*
* Remove empty tabs from collection
*/
if (!count($this->fields[$tab])) {
unset($this->fields[$tab]);
}