I found a bug for loading view with second array parameter. I use version 3.1.0.
My controller function:
public function test(){
$data=array('a'=>'A','b'=>'B');
$this->load->view('test',$data);
$data=array();
$data=array('b'=>'B');
$this->load->view('test',$data);
}
and this is my TEST view file:
<?php echo $a.'-'.$b.'|';
If you run this structure; it will generate :
A-B|A-B|
but it must generate and give us a notice message that $a not defined:
A-B|-B|
because we don't define $a for second call of view file.
I tried unset($data) but issues still continues.
I don't know why this happens but it can be a buffer problem or somethink else like this.
My controller function:
public function test(){
$data=array('a'=>'A','b'=>'B');
$this->load->view('test',$data);
$data=array();
$data=array('b'=>'B');
$this->load->view('test',$data);
}
and this is my TEST view file:
<?php echo $a.'-'.$b.'|';
If you run this structure; it will generate :
A-B|A-B|
but it must generate and give us a notice message that $a not defined:
A-B|-B|
because we don't define $a for second call of view file.
I tried unset($data) but issues still continues.
I don't know why this happens but it can be a buffer problem or somethink else like this.