Welcome Guest, Not a member yet? Register   Sign In
[Solved] Error On Controller
#1

(This post was last modified: 06-13-2016, 12:41 AM by wolfgang1983.)

I have a error


Code:
Severity: Notice
Message: Undefined index: module_display_id
Filename: module/Carousel.php

I get information passed through my index


PHP Code:
public function index($info) {
   // Some code here 


When I echo $info['module_display_id']; it throws the error.

I var dump $info on my controller below and outputs.

PHP Code:
array (size=1)
 
 0 => 
 
   array (size=3)
 
     'module_id' => string '3' (length=1)
 
     'module_display_id' => string '3' (length=1)
 
     'module_name' => string 'carousel' (length=8

Here is the full controller I use HMVC How can I get it to work.

PHP Code:
<?php

class Carousel extends MX_Controller {
    
    public function 
__construct() {
        
parent::__construct();
    }

    public function 
index($info) {
        static 
$module 0;

        
$data['banners'] = array();

        
var_dump($info);

        echo 
$info['module_display_id'];

        
$data['module'] = $module++;

        
$this->load->view('theme/default/template/module/carousel'$data);
    }

There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply
#2

$info[0]['module_display_id']
Reply
#3

(06-13-2016, 12:39 AM)skunkbad Wrote: $info[0]['module_display_id']

Thanks for that worked.
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB