Prado\Exceptions\TInvalidDataTypeException

Description

TControlList can only accept strings or TControl objects.

Source File

/home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Web/UI/TControlCollection.php (69)

0058:      * @param mixed $item new item
0059:      * @throws TInvalidDataTypeException if the item to be inserted is neither a string nor a TControl.
0060:      */
0061:     public function insertAt($index, $item)
0062:     {
0063:         if ($item instanceof TControl) {
0064:             parent::insertAt($index, $item);
0065:             $this->_o->addedControl($item);
0066:         } elseif (is_string($item) || ($item instanceof IRenderable)) {
0067:             parent::insertAt($index, $item);
0068:         } else {
0069: throw new TInvalidDataTypeException('controlcollection_control_required');
0070: } 0071: } 0072: 0073: /** 0074: * Removes an item at the specified position. 0075: * This overrides the parent implementation by performing additional 0076: * cleanup work when removing a child control. 0077: * @param int $index the index of the item to be removed. 0078: * @return mixed the removed item. 0079: */ 0080: public function removeAt($index) 0081: {

Stack Trace

#0 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Collections/TList.php(381): Prado\Web\UI\TControlCollection->insertAt(0, NULL)
#1 /home/pdcge/public_html/protected/Pages/Frontend/Evenement.php(16): Prado\Collections\TList->offsetSet(NULL, NULL)
#2 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Web/UI/TControl.php(1334): Evenement->onLoad(NULL)
#3 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Web/UI/TPage.php(228): Prado\Web\UI\TControl->loadRecursive()
#4 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Web/UI/TPage.php(208): Prado\Web\UI\TPage->processNormalRequest(Object(Prado\Web\UI\THtmlWriter))
#5 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Web/Services/TPageService.php(528): Prado\Web\UI\TPage->run(Object(Prado\Web\UI\THtmlWriter))
#6 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/Web/Services/TPageService.php(465): Prado\Web\Services\TPageService->runPage(Object(Evenement), Array)
#7 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/TApplication.php(1190): Prado\Web\Services\TPageService->run()
#8 /home/pdcge/public_html/protected/vendor/pradosoft/prado/framework/TApplication.php(382): Prado\TApplication->runService()
#9 /home/pdcge/public_html/index.php(201): Prado\TApplication->run()
#10 {main}
2020-08-15 07:58 Apache PRADO/4.0.1