Getting notice:
Trying to access array offset on value of type bool in uc_quote_uc_order() (line 311.
This only happens when login as administrator This is the code:
/**
* Implements hook_uc_order().
*/
function uc_quote_uc_order($op, $order, $arg2) {
switch ($op) {
case 'save':
if (isset($order->quote['method'])) {
db_merge('uc_order_quotes')
->key(array('order_id' => $order->order_id))
->fields(array(
'method' => $order->quote['method'],
'accessorials' => $order->quote['accessorials'],
'rate' => $order->quote['rate'],
))
->execute();
}
break;
case 'load':
$quote = db_query("SELECT method, accessorials, rate FROM {uc_order_quotes} WHERE
order_id = :id", array(':id' => $order->order_id))->fetchAssoc();
$order->quote = $quote;
311>> $order->quote['accessorials'] = strval($quote['accessorials']); break;
case 'delete':
db_delete('uc_order_quotes')
->condition('order_id', $order->order_id)
->execute();
break;
}
}