We added a custom project_stats page to our TestRail install to show various metrics in realtime.
Unfortunately, we get an error now:
Trying to get property of non-object --- Details: <missing> File: /var/www/testrail/app/views/layout/header.php Line: 180 Status Code: 500 Host: testrail-mobile.host.com Uri: /index.php?/custom/project_stats/index/3 (GET) --- Trace: at errors::show (errors.php:53) at ErrorHandler::error (header.php:180) at unknown (loader.php:195) at Loader_core->view_abs (loader.php:168) at Loader_core->view (index.php:16) at unknown (loader.php:195) at Loader_core->view_abs (loader.php:168) at Loader_core->view (loader.php:216) at Loader_core->page (project_stats.php:58) at Project_stats_controller->index (controller.php:106) at Controller->_invoke_web (controller.php:74) at Controller->_invoke (gizmo.php:101) at require_once (index.php:106) --- Version: 184.108.40.20649
Can you help us figure out what we are doing wrong? I can’t inspect header.php to figure it out myself.
This is what we have in our custom page that appears to trigger the issue:
<?php $header = array( 'page_title' => "Project statistics ($project->name)", 'page_section' => $project->name, 'page_backlink' => true, 'page_menu' => 'project', 'page_project' => $project->id, 'page_selected_menu' => 'metrics', 'page_flash' => true, 'page_breadcrumb' => array( 'dashboard' => lang('pages_dashboard'), $project->name ) ); $GI->load->view('layout/header', $header); ?>