TPhpErrorException

Description

[Warning] count(): Parameter must be an array or an object that implements Countable (@line 223 in file /home/kolram/tododj.com/protected/prado/framework/Data/Common/Mysql/TMysqlMetaData.php).

Source File

/home/kolram/tododj.com/protected/prado/framework/Data/Common/Mysql/TMysqlMetaData.php (223)

0212:         if($this->getServerVersion()<5.01)
0213:             return false;
0214:         if($schemaName!==null)
0215:             $sql = "SHOW FULL TABLES FROM `{$schemaName}` LIKE ':table'";
0216:         else
0217:             $sql = "SHOW FULL TABLES LIKE ':table'";
0218: 
0219:         $command = $this->getDbConnection()->createCommand($sql);
0220:         $command->bindValue(':table', $tableName);
0221:         try
0222:         {
0223: return count($result = $command->queryRow()) > 0 && $result['Table_type']==='VIEW';
0224: } 0225: catch(TDbException $e) 0226: { 0227: $table = $schemaName===null?$tableName:$schemaName.'.'.$tableName; 0228: throw new TDbException('dbcommon_invalid_table_name',$table,$e->getMessage()); 0229: } 0230: } 0231: 0232: /** 0233: * Gets the primary and foreign key column details for the given table. 0234: * @param string schema name 0235: * @param string table name.

Stack Trace

#0 /home/kolram/tododj.com/protected/prado/framework/Data/Common/Mysql/TMysqlMetaData.php(223): PradoBase::phpErrorHandler(2, 'count(): Parame...', '/home/kolram/to...', 223, Array)
#1 /home/kolram/tododj.com/protected/prado/framework/Data/Common/Mysql/TMysqlMetaData.php(193): TMysqlMetaData->getIsView(NULL, 'item')
#2 /home/kolram/tododj.com/protected/prado/framework/Data/Common/Mysql/TMysqlMetaData.php(54): TMysqlMetaData->createNewTableInfo('item')
#3 /home/kolram/tododj.com/protected/prado/framework/Data/Common/TDbMetaData.php(93): TMysqlMetaData->createTableInfo('item')
#4 /home/kolram/tododj.com/protected/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php(109): TDbMetaData->getTableInfo('item')
#5 /home/kolram/tododj.com/protected/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php(81): TActiveRecordGateway->getTableInfo(Object(TDbConnection), 'item')
#6 /home/kolram/tododj.com/protected/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php(126): TActiveRecordGateway->getRecordTableInfo(Object(ItemRecord))
#7 /home/kolram/tododj.com/protected/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php(235): TActiveRecordGateway->getCommand(Object(ItemRecord))
#8 /home/kolram/tododj.com/protected/prado/framework/Data/ActiveRecord/TActiveRecord.php(527): TActiveRecordGateway->findRecordsBySql(Object(ItemRecord), Object(TActiveRecordCriteria))
#9 /home/kolram/tododj.com/protected/data/ItemRecord.php(38): TActiveRecord->findAllBySql('SELECT * FROM v...', true)
#10 /home/kolram/tododj.com/protected/pages/Home.php(6): ItemRecord::getOfertas()
#11 /home/kolram/tododj.com/protected/prado/framework/Web/UI/TControl.php(1270): Home->onInit(NULL)
#12 /home/kolram/tododj.com/protected/prado/framework/Web/UI/TCompositeControl.php(35): TControl->initRecursive(Object(Home))
#13 /home/kolram/tododj.com/protected/prado/framework/Web/UI/TTemplateControl.php(240): TCompositeControl->initRecursive(NULL)
#14 /home/kolram/tododj.com/protected/prado/framework/Web/UI/TPage.php(202): TTemplateControl->initRecursive()
#15 /home/kolram/tododj.com/protected/prado/framework/Web/UI/TPage.php(193): TPage->processNormalRequest(Object(THtmlWriter))
#16 /home/kolram/tododj.com/protected/prado/framework/Web/Services/TPageService.php(474): TPage->run(Object(THtmlWriter))
#17 /home/kolram/tododj.com/protected/prado/framework/Web/Services/TPageService.php(420): TPageService->runPage(Object(Home), Array)
#18 /home/kolram/tododj.com/protected/prado/framework/TApplication.php(1066): TPageService->run()
#19 /home/kolram/tododj.com/protected/prado/framework/TApplication.php(376): TApplication->runService()
#20 /home/kolram/tododj.com/index.php(21): TApplication->run()
#21 {main}
2020-04-02 20:46 Apache PRADO/3.1.1