TInvalidDataTypeException

Description

TControlList can only accept strings or TControl objects.

Source File

/homepages/33/d234674840/htdocs/classes/prado/Web/UI/TControl.php (1823)

1812:      */
1813:     public function insertAt($index,$item)
1814:     {
1815:         if($item instanceof TControl)
1816:         {
1817:             parent::insertAt($index,$item);
1818:             $this->_o->addedControl($item);
1819:         }
1820:         else if(is_string($item) || ($item instanceof IRenderable))
1821:             parent::insertAt($index,$item);
1822:         else
1823: throw new TInvalidDataTypeException('controlcollection_control_required');
1824: } 1825: 1826: /** 1827: * Removes an item at the specified position. 1828: * This overrides the parent implementation by performing additional 1829: * cleanup work when removing a child control. 1830: * @param integer the index of the item to be removed. 1831: * @return mixed the removed item. 1832: */ 1833: public function removeAt($index) 1834: { 1835: $item=parent::removeAt($index);

Stack Trace

#0 /homepages/33/d234674840/htdocs/classes/prado/Collections/TList.php(137): TControlCollection->insertAt(0, NULL)
#1 /homepages/33/d234674840/htdocs/protected/controls/LocationRenderer.php(39): TList->add(NULL)
#2 /homepages/33/d234674840/htdocs/classes/prado/Web/UI/TControl.php(1322): LocationRenderer->onPreRender(NULL)
#3 /homepages/33/d234674840/htdocs/classes/prado/Web/UI/TControl.php(1328): TControl->preRenderRecursive()
#4 /homepages/33/d234674840/htdocs/classes/prado/Web/UI/TControl.php(1328): TControl->preRenderRecursive()
#5 /homepages/33/d234674840/htdocs/classes/prado/Web/UI/TControl.php(1328): TControl->preRenderRecursive()
#6 /homepages/33/d234674840/htdocs/classes/prado/Web/UI/TControl.php(1328): TControl->preRenderRecursive()
#7 /homepages/33/d234674840/htdocs/classes/prado/Web/UI/TControl.php(1328): TControl->preRenderRecursive()
#8 /homepages/33/d234674840/htdocs/classes/prado/Web/UI/TPage.php(227): TControl->preRenderRecursive()
#9 /homepages/33/d234674840/htdocs/classes/prado/Web/UI/TPage.php(203): TPage->processNormalRequest(Object(THtmlWriter))
#10 /homepages/33/d234674840/htdocs/classes/prado/Web/Services/TPageService.php(524): TPage->run(Object(THtmlWriter))
#11 /homepages/33/d234674840/htdocs/classes/prado/Web/Services/TPageService.php(470): TPageService->runPage(Object(LocationPage), Array)
#12 /homepages/33/d234674840/htdocs/classes/prado/TApplication.php(1189): TPageService->run()
#13 /homepages/33/d234674840/htdocs/classes/prado/TApplication.php(406): TApplication->runService()
#14 /homepages/33/d234674840/htdocs/index.php(18): TApplication->run()
#15 {main}
2014-09-01 09:27 Apache PRADO/3.2.1