fix table not found issue

This commit is contained in:
2014-10-24 00:24:11 +02:00
parent 642ee4e8a8
commit 1436026738

View File

@@ -992,7 +992,7 @@ class Databap extends PhpObject
//Extract table data
$asTable = $this->getTableInfo($iTableId);
$bSuccess = array_key_exists(MySqlManager::getId(self::TABL_TABLE), $asTable);
$bSuccess = !empty($asTable);
$sDesc = '';
if($bSuccess)
{
@@ -1159,7 +1159,8 @@ class Databap extends PhpObject
private function getTableInfo($iTableId, $bFormatting=true)
{
$asTable = $this->oMySql->selectRow(self::TABL_TABLE, $iTableId);
if(!empty($asTable))
if(!$asTable) $asTable = array(); //return false on empty
else
{
$asTable['timestamp'] = strtotime($asTable['led']);
if($bFormatting)