Skip to content

Bug regarding : Undefined offset: 0 fix... #12

@jackttcoms

Description

@jackttcoms

Ok so I saw that you fixed the bug but unfortunately when I go to use it with the $data array to hold more data all those awful messages come back!

My View Code:

<!doctype html>
<html>
<head>
	<!-- Head -->
	<?php extend_view(['common/head'], $data) ?>
	<!-- CSS -->
    <?php load_style(['bootstrap.min','main','custom']) ?>
</head>
<body class="d-flex flex-column">
	<!-- Global Message -->
	<?php echo flash('message'); ?>
	<!-- Header -->
	<?php extend_view(['common/header'], $data) ?>

	<!-- Page Content -->
	<section class="container-fluid flex-grow">
		
	</section>
	<!-- End Page Content -->

	<!-- Footer -->
	<?php extend_view(['common/footer'], $data) ?>
	<!-- JS -->
	<?php load_script(['jquery-3.2.1.min','bootstrap.bundle.min','main']); ?>
</body>
</html>

My Controller Code:

<?php if (!defined('BASE_PATH')) exit('No direct script access allowed');

class Home extends Controller
{
    public function __construct()
    {
        $this->load_helper(['view','session']);
    }

    public function index($param1 = '', $param2 = '')
    {
		$data = [
		'title' => 'This is a meta title'
		];
		$this->view('home', $data);
    }

    public function phpinfo()
    {
        echo phpinfo();
    }

}

This is what triggers it:

    public function index($param1 = '', $param2 = '')
    {
		$data = [
		'title' => 'This is a meta title',
                'description' => ''
		];
		$this->view('home', $data);
    }

To not trigger it:

    public function index($param1 = '', $param2 = '')
    {
		$this->view('home');
    }

Thanks

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions