404 Page: A PHP Error was encountered

edited December 2016 in Modules
I made some changes to my header to include a few blocks, such as:
<div class="ad leaderboard"><?php $this->load->view('_blocks/ad-server/leaderboard'); ?></div>

Now if you access the 404 page, it displays:
A PHP Error was encountered Severity: Notice Message: Undefined property: CI_Exceptions::$load Filename: _blocks/header.php Line Number: 27 Fatal error: Call to a member function view() on a non-object in /home/public_html/fuel/application/views/_blocks/header.php on line 27

How can I avoid that?

Comments

  • edited 2:48PM
    Try using:<div class="ad leaderboard"><?php CI()->load->view('_blocks/ad-server/leaderboard'); ?></div>
  • edited 2:48PM
    Perfect, thank you.
Sign In or Register to comment.