Fatal error: Unsupported operand types
<p>I just can't figure it out :(</p>

<p>the complete script...</p>

<p>the trouble lines are noted by "This Line"
I can rem them out and the script will work but only half way :(</p>

<pre><code>require_once("global.php");

$kernel-&gt;vars['page_struct']['system_page_action_title'] = $kernel-&gt;ld['phrase_page_title_statistics'];

// No categories in archive
if ($kernel-&gt;db-&gt;numrows("SELECT `category_id` FROM `" . TABLE_PREFIX . "categories`") == 0) {
  $kernel-&gt;page-&gt;message_report($kernel-&gt;ld['phrase_no_categories'], M_NOTICE);
}
else {
  $kernel-&gt;tp-&gt;call("page_statistics");
  $kernel-&gt;vars['stats'] = array();

  // Archive Highs
  // This line.
  $kernel-&gt;vars['stats'] = $kernel-&gt;vars['stats'] + $kernel-&gt;db-&gt;row("SELECT `file_id` AS `latest_file_id`, `file_name` AS `latest_file_name`, `file_timestamp` AS `latest_file_timestamp` FROM `" . TABLE_PREFIX . "files` ORDER BY `file_id` DESC LIMIT 1");
  $kernel-&gt;vars['stats']['latest_file_timestamp'] = $kernel-&gt;fetch_time($kernel-&gt;vars['stats']['latest_file_timestamp'], DF_SHORT);

  // This line.
  $kernel-&gt;vars['stats'] = $kernel-&gt;vars['stats'] + $kernel-&gt;db-&gt;row("SELECT `file_id` AS `mostdl_file_id`, `file_name` AS `mostdl_file_name`, `file_downloads` AS `mostdl_file_downloads` FROM `" . TABLE_PREFIX . "files` ORDER BY `file_downloads` DESC LIMIT 1");
  $kernel-&gt;vars['stats']['mostdl_file_downloads'] = $kernel-&gt;vars['stats']['mostdl_file_downloads'];

  // This line.
  $kernel-&gt;vars['stats'] = $kernel-&gt;vars['stats'] + $kernel-&gt;db-&gt;row("SELECT `file_id` AS `leastdl_file_id`, `file_name` AS `leastdl_file_name`, `file_downloads` AS `leastdl_file_downloads` FROM `" . TABLE_PREFIX . "files` ORDER BY `file_downloads` ASC LIMIT 1");
  $kernel-&gt;vars['stats']['leastdl_file_downloads'] = $kernel-&gt;vars['stats']['leastdl_file_downloads'];

  // This line.
  $kernel-&gt;vars['stats'] = $kernel-&gt;vars['stats'] + $kernel-&gt;db-&gt;row("SELECT `file_id` AS `highrate_file_id`, `file_name` AS `highrate_file_name`, `file_rating` AS `highrate_file_rating`, `file_votes` AS `highrate_file_votes` FROM `" . TABLE_PREFIX . "files` ORDER BY `file_rating` DESC, `file_votes` DESC LIMIT 1");
  $kernel-&gt;vars['stats']['highrate_file_rank'] = $kernel-&gt;archive-&gt;construct_file_rating($kernel-&gt;vars['stats']['highrate_file_rating'], $kernel-&gt;vars['stats']['highrate_file_votes']);

  // Datastore counters
  $datastore_keys = array("total_announcements", "total_files", "total_categories", "total_users", "total_downloads", "total_votes", "total_images", "total_comments");

  foreach($datastore_keys AS $counter) {
    $kernel-&gt;vars['stats']["$counter"] = $kernel-&gt;format_input($kernel-&gt;db-&gt;item("SELECT `datastore_value` FROM `" . TABLE_PREFIX . "datastore` WHERE `datastore_key` = 'count_" . $counter . "'"), T_NUM);
  }

  $kernel-&gt;ld['phrase_statistics_message'] = sprintf($kernel-&gt;ld['phrase_statistics_message'], $kernel-&gt;fetch_time($kernel-&gt;config['archive_start'], DF_SHORT), $kernel-&gt;archive-&gt;format_round_bytes($kernel-&gt;db-&gt;item("SELECT `datastore_value` FROM `" . TABLE_PREFIX . "datastore` WHERE `datastore_key` = 'count_total_data'")));

  $kernel-&gt;tp-&gt;cache($kernel-&gt;vars['stats']);
}

$kernel-&gt;page-&gt;construct_output(R_HEADER, R_FOOTER, false, R_NAVIGATION);
</code></pre>
