Hello!
I can’t figure out, why my code returns undefined offset.
My stacktrace is:
Undefined offset: 0
/data/www/yii/framework/db/CDbCommand.php(495)
492 if(($result=$cache->get($cacheKey))!==false)
493 {
494 Yii::trace('Query result found in cache','system.db.CDbCommand');
495 return $result[0];
496 }
/data/www/site/protected/models/ChatPost.php(34): CDbCommand->queryRow()
34 $this->roomData = Yii::app()->db->cache(3600)->createCommand("SELECT * FROM rooms WHERE id={$this->room}")->queryRow();
Can you please help me to debug this problem? It occurs only with missing cached data. For the second try everything is ok.