Welcome Guest, Not a member yet? Register   Sign In
[v2] - getting Undefined property with model
#1

I have the following code which giving me Undefined property: Uploader::$mod_Photoalbums_model

PHP Code:
<?php
if (!defined('BASEPATH'))
    exit(
'No direct script access allowed');

class 
Uploader extends MY_Controller {
    public function 
__construct() {
        
parent::__construct();
        
        
$this->load->library('image_lib');
        
$this->load->library('qquploadedfilexhr');
        
$this->load->model('Uploader_model');
        
$this->load->model('Portfolio_model'); 
        
$this->load->model('mod_Photoalbums_model');
        }

        public function 
insertIntoDatabase($id$module$filename$thumbnail$folder) {
        
$result false;

        switch (
$module) {            
            case 
'portfolio_images':
                
//PORTFOLIO - IMAGES
                

                
$result $this->Portfolio_model->add_image($id$module$filename$thumbnail$folder);
                
                break;                
            case 
'photoalbums_images':
                
//PHOTOALBUM - IMAGES
                
                
$result $this->mod_Photoalbums_model->add_image($id$module$filename$thumbnail$folder);
                
                break;
            case 
'pages':
                
//PAGES > CONNECTIONS (tab3) > UPLOADS
                
                
$result $this->page_model->addUploadToDatabase($id$module$filenamenull$folder$this->upload_title$this->upload_desc);
                
                break;
        }
        
        return 
$result;
    }



Photoalbum Model > On filesystem the name is lowercase

PHP Code:
class mod_Photoalbums_model extends MY_Model {
    public function 
__construct() {
        
parent::__construct();
    }

//ETC ETC


Code:
Severity: Notice
Message:  Undefined property: Uploader::$mod_Photoalbums_model
Filename: controllers/uploader.php
Line Number: 188

Anyone ?
Reply


Messages In This Thread
[v2] - getting Undefined property with model - by Krycek - 03-09-2015, 03:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB