See file /var/www/vhosts/h146521.web17.servicehoster.ch/public_html/protected/controller/ReferencesController.php


+ Error on line 81

        $this->setData('title'$data->name);

<?php
Doo
::loadClass('RestController');

class 
ReferencesController extends RestController {

    public 
$_model 'References';
    
    public 
$_url 'references';
    
    public 
$_usePagination true;
    
    public function 
__construct() {
        
session_start();
        
$this->_data['title'] = 'Referenzen';
    }
    
    public function 
create() {
        if(isset(
$_FILES['file'])) {
            
Doo::loadHelper('DooGdImage');
            
$path 'upload/';
            
$imageHelper = new DooGdImage(
                
Doo::conf()->SITE_PATH $path
                
Doo::conf()->SITE_PATH $path
            
);
            
$fileName $imageHelper->uploadImage('file');
            if(
$fileName) {
                
$thumbName $imageHelper->createThumb($fileName178121);
                
$thumbName str_replace(Doo::conf()->SITE_PATH 'upload/'$path$thumbName);
                
                
$midiName $imageHelper->createThumb($fileName420301);
                
$midiName str_replace(Doo::conf()->SITE_PATH 'upload/'$path$midiName);
                
$fileName $path $fileName;
            }
            echo 
$this->toJSON(array(
                
'success' => !!$fileName,
                
'data' => array(
                    
'filename' => $fileName,
                    
'thumb' => $thumbName,
                    
'midi' => $midiName
                
)
            ));
        }
        
$this->initPostVars(
            array(
'user_id' => $_SESSION['user']['id'])
        );
        
parent::create();
    }
    
    
/**
     * the detail function is called by router
     * ex. url: {get}/controller/id
     */
    
public function detail() {
        
$model $this->getModel();
        
$model $this->setWhere($model);
        
$references $model->limit(10null'updated_at');
        
$this->setData('ReferencesSide'$references);
        
parent::detail();
    }    
    
    public function 
fetchWhere($model) {
        if(!
$this->isAjax()) {
            
$model->isactive 1;
            return 
$model;
        }
        return 
parent::fetchWhere($model);
    }
    
    public function 
fetchOptions() {
        return array(
            
'desc' => 'updated_at'
        
);
    }
    
    public function 
indexData($data) {
        
$this->setData('ReferencesSide'$data['References']);
        return 
$data;
    }    
    
    public function 
detailData($data) {
        $this->setData('title'$data->name);

        return 
$data;
    }
    
    public function 
createData($data) {
        
$data['created_at'] = date('Y-m-d H:i:s');
        return 
$data;
    }
    
}


* Stack Trace...

  1. /var/www/vhosts/h146521.web17.servicehoster.ch/public_html/index.php(23) calling run()
  2. /var/www/vhosts/h146521.web17.servicehoster.ch/public_html/kb/app/DooWebApp.php(34) calling routeTo()
  3. /var/www/vhosts/h146521.web17.servicehoster.ch/public_html/kb/app/DooWebApp.php(114) calling detail()
  4. /var/www/vhosts/h146521.web17.servicehoster.ch/public_html/protected/controller/ReferencesController.php(58) calling detail()
  5. /var/www/vhosts/h146521.web17.servicehoster.ch/public_html/protected/class/RestController.php(130) calling detailData()


* Variables...  Conf .  GET  .  POST  .  Session  .  Cookie 


object(DooConfig)#1 (22) {
  
["AUTOLOAD"] => NULL
  
["SITE_PATH"] => string(59"/var/www/vhosts/h146521.web17.servicehoster.ch/public_html/"
  
["PROTECTED_FOLDER"] => string(10"protected/"
  
["BASE_PATH"] => string(62"/var/www/vhosts/h146521.web17.servicehoster.ch/public_html/kb/"
  
["LOG_PATH"] => NULL
  
["APP_URL"] => string(1"/"
  
["SUBFOLDER"] => string(1"/"
  
["APP_MODE"] => string(4"prod"
  
["AUTOROUTE"] => bool(true)
  [
"DEBUG_ENABLED"] => bool(false)
  [
"ERROR_404_DOCUMENT"] => NULL
  
["ERROR_404_ROUTE"] => string(6"/error"
  
["CACHE_PATH"] => NULL
  
["AUTO_VIEW_RENDER_PATH"] => string(15"/referenzen/:id"
  
["MEMCACHE"] => NULL
  
["TEMPLATE_ENGINE"] => string(7"DooView"
  
["TEMPLATE_SHOW_COMMENT"] => NULL
  
["TEMPLATE_ALLOW_PHP"] => NULL
  
["TEMPLATE_COMPILE_ALWAYS"] => bool(true)
  [
"TEMPLATE_GLOBAL_TAGS"] => NULL
  
["MODULES"] => NULL
  
["APP_NAMESPACE_ID"] => NULL
}
$_SESSION Variables array(0) {
}
$_COOKIE Variables array(0) {
}

BACK TO TOP