I've two controllers one is "Upload" which deals with images uploads and other is "Page" whid deals with the creation of pages of CMS now if in my "Upload" controller I load both the models i.e 'image\_m' which deals with image upload and "page\_m" which deals with the pages creation I've highlighted the relevant code my problem is if I access the variables in the view 

1. ***$this->data['images'] = $this->image\_m->get();*** sent by this I can access in foreach loop as `"$images->image_title, $images->image_path"` etc
2. But the variable sent by this line `***$this->data['get_with_images'] = $this->page_m->get_no_parents();***` as $get\_with\_images->page\_name, $get\_with\_images->page\_id etc produces given error

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: upload/index.php

Line Number: 20

what is the difference between these two access levels one for $image & other for $get\_with\_images because I can only access its values as $get\_with\_images

```
class Upload extends Admin_Controller {
    public function __construct() {
        parent::__construct();
        ***$this->load->model('image_m');
        $this->load->model('page_m');***
    }
    public function index($id = NULL) {
        //var_dump($this->data['images'] = $this->image_m->get_with_images());
        //$this->data['images'] = $this->image_m->get_with_images();
        ***$this->data['images'] = $this->image_m->get();***
        $this->data['subview'] = 'admin/upload/index';

        if ($id) {
            $this->data['image'] = $this->image_m->get($id);
            count($this->data['image']) || $this->data['errors'][] = 'Page Could not be found';
        }
        $id == NULL || $this->data['image'] = $this->image_m->get($id);
        /*this calls the page_m model function to load all the pages from pages table*/
        ***$this->data['get_with_images'] = $this->page_m->get_no_parents();*** 

```