objectManager: Prevent accessing an undefined variable

This commit is contained in:
Alexander Nicolaysen Sørnes
2009-07-30 18:28:50 +02:00
parent 5cce3b1c5f
commit b8ac180e11

View File

@@ -104,13 +104,12 @@ class ObjectManager
public function setSortInfo($aClean = null)
{
$this->oSortInfo = new TableSortInfo($this->makeUrl().'&');
/* No use to continue if there are no sortable fields */
if(!$this->getOptionalSetting("objectGetSortableFields", FALSE))
return;
$this->oSortInfo = null;
$this->oSortInfo = new TableSortInfo($this->makeUrl().'&');
if($aClean)
$this->oSortInfo->ParseArray($aClean, $this->getObject()->objectGetSortableFields());
}