Fatal error: Uncaught Error: Cannot unset string offsets in
/data/www/linktour/api/application/modules/private/controllers/OrdersController.php:400
Stack trace:
#0 [internal function]: Modules\_Private\Controllers\OrdersController->getAction('91')
#1 [internal function]: Phalcon\Mvc\Micro\LazyLoader->__call('getAction', Array)
#2 /data/www/linktour/api/public/index.php(369): Phalcon\Mvc\Micro->handle()
#3 {main}
thrown in /data/www/linktour/api/application/modules/private/controllers/OrdersController.php on line 400
The PHP Code IS:
........
if($role == 'seller' || $role == 'full'){
$order['total'] = $order['seller']['total'];
$order['refund'] = $order['seller']['refund'];
$order['revenue'] = $order['seller']['revenue'];
unset($order['seller']);
}
if(false === $order['cancellation_fee']) unset($order['cancellation_fee']);
// here is the 400 line code
unset($order['buyer_uid'], $order['buyer_username'], $order['seller']['email'], $order['seller']['callback'], $order['seller']['logo'], $order['seller']['wechat'], $order['buyer']['email'], $order['buyer']['callback'], $order['buyer']['logo'], $order['buyer']['wechat'], $order['rate'], $order['payment']);
foreach($order['logs'] as &$log){
$log['created'] = date("c", $log['created']);
$log['status'] = $this->id2name($log['status']);
}
.........