TPhpErrorException

Description

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

Source File

/users/mcgay.com/htdocs/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 /users/mcgay.com/htdocs/prado/framework/Data/Common/Mysql/TMysqlMetaData.php(223): PradoBase::phpErrorHandler(2, 'count(): Parame...', '/users/mcgay.co...', 223, Array)
#1 /users/mcgay.com/htdocs/prado/framework/Data/Common/Mysql/TMysqlMetaData.php(193): TMysqlMetaData->getIsView(NULL, 'general_config')
#2 /users/mcgay.com/htdocs/prado/framework/Data/Common/Mysql/TMysqlMetaData.php(54): TMysqlMetaData->createNewTableInfo('general_config')
#3 /users/mcgay.com/htdocs/prado/framework/Data/Common/TDbMetaData.php(93): TMysqlMetaData->createTableInfo('general_config')
#4 /users/mcgay.com/htdocs/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php(121): TDbMetaData->getTableInfo('general_config')
#5 /users/mcgay.com/htdocs/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php(93): TActiveRecordGateway->getTableInfo(Object(TDbConnection), 'general_config')
#6 /users/mcgay.com/htdocs/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php(138): TActiveRecordGateway->getRecordTableInfo(Object(GeneralRecord))
#7 /users/mcgay.com/htdocs/prado/framework/Data/ActiveRecord/TActiveRecordGateway.php(198): TActiveRecordGateway->getCommand(Object(GeneralRecord))
#8 /users/mcgay.com/htdocs/prado/framework/Data/ActiveRecord/TActiveRecord.php(612): TActiveRecordGateway->findRecordByPK(Object(GeneralRecord), '1')
#9 /users/mcgay.com/htdocs/protected/pages/Home.php(9): TActiveRecord->findByPk('1')
#10 /users/mcgay.com/htdocs/prado/framework/Web/UI/TPage.php(199): Home->onPreInit(NULL)
#11 /users/mcgay.com/htdocs/prado/framework/Web/UI/TPage.php(193): TPage->processNormalRequest(Object(THtmlWriter))
#12 /users/mcgay.com/htdocs/prado/framework/Web/Services/TPageService.php(474): TPage->run(Object(THtmlWriter))
#13 /users/mcgay.com/htdocs/prado/framework/Web/Services/TPageService.php(420): TPageService->runPage(Object(Home), Array)
#14 /users/mcgay.com/htdocs/prado/framework/TApplication.php(1091): TPageService->run()
#15 /users/mcgay.com/htdocs/prado/framework/TApplication.php(382): TApplication->runService()
#16 /users/mcgay.com/htdocs/index.php(21): TApplication->run()
#17 {main}
2018-09-20 14:57 Apache/2.4.18 (Ubuntu) PRADO/3.1.3