Nexus_Noob
Новичок
Здравствуйте, не могу понять в чем проблема.
Возникает ошибка:
Код файла:
Проверял является ли $row массивом:
На выходе:
Помоги, пожалуйста, устранить ошибку.
Возникает ошибка:
PHP:
Fatal error: Cannot use string offset as an array in /www/system/modules/tours.module/actions/list.action/models/default.model.php on line 8
PHP:
<?
if(!isset($tours_query)) $tours_query=mysql_query("SELECT *,(SELECT SUM(`clients_num`) FROM `orders__list` WHERE `tour_id`=`tours`.`id`) FROM `tours` ORDER BY `gone_date` DESC LIMIT 0,10");
$tours=array();
if(_check_mysql_response($tours_query)){
while($row=mysql_fetch_assoc($tours_query)){
$row=_unserialize($row);
$row['param']['places']['bisy']=(int)array_pop($row);//Ошибка тут
if(isset($__tours_list__users_list[$row['author']])){
$row['author']=$__tours_list__users_list[$row['author']];
}else $row['author']=false;
if(isset($__tours_list__users_list[$row['history'][count($row['history'])-1]['user']])){
$row['history'][count($row['history'])-1]['user']=$__tours_list__users_list[$row['history'][count($row['history'])-1]['user']];
}else $row['history'][count($row['history'])-1]['user']=false;
$row['publ']=false;
if(date("Y-m-d H:i:s")>$row['publ_date'] and date("Y-m-d H:i:s")<$row['hide_date']) $row['publ']=true;
$tours[]=$row;
};
}elseif(mysql_num_rows($tours_query)>0) _sys_error("Mod:Tours:List:Default.model:".__LINE__.": Не удалось получить из БД список туров");
?>
PHP:
var_dump(
gettype($row),
gettype($row['param']),
gettype($row['param']['places']),
gettype($row['param']['places']['bisy']),
gettype(array_pop($row))
);exit;
PHP:
string(5) "array"
string(5) "array"
string(5) "array"
string(7) "integer"
string(6) "string"