See file /home/innamkhi/public_html/protected/controller/site/HomeController.php


+ Error on line 27

                $value2['description'] = str_replace('global'''$value2['description']);

<?php
class HomeController extends DooController {

    protected 
$data = array();
    public function  
__construct(){        
    }
    public function 
beforeRun($resouce$action) {
        
$this->data['app_url'] = Doo::conf()->APP_URL;
    }    
    public function 
home() {
        
$res Doo::db()->query('SELECT title, tag, crt_date FROM story WHERE on_top = 1 OR on_top = 2 ORDER BY on_top ASC');
        
$arr $res->fetchAll();
        
$this->data['story_arr'] = $arr;
                
        
$this->data['rand_num'] = rand(14);    
        
$this->data['rand_big_num'] = rand(10000009999999);    
                
        
$res Doo::db()->query('SELECT title, tag, crt_date, description FROM story WHERE on_top = -1 ORDER BY RAND() LIMIT 1');
        
$arr $res->fetchAll();
        
$this->data['story_rand'] = $arr[0];
        
        
$res Doo::db()->query('SELECT title, tag, crt_date, description FROM blog ORDER BY crt_date DESC LIMIT 3');
        
$arr $res->fetchAll();
        foreach (
$arr as $value1) {
            foreach (
$value1 as $value2) {
                
//$value2['description'] = $this->getClearString($value2['description']);                
                $value2['description'] = str_replace('global'''$value2['description']);

            }
        }
        
        for(
$i 0$i count($arr); $i++) {
            if(
is_array($arr[$i])) {
                for(
$j 0$j count($arr[$i]); $j++) {
                    
$arr[$i]['description'] = stripslashes($arr[$i]['description']);
                    
$arr[$i]['title'] = stripslashes($arr[$i]['title']);
                    
$date = new DateTime($arr[$i]['crt_date']);
                    
$arr[$i]['crt_date'] = $date->format('F j, Y');
                }
            }
        }
        
$this->data['blog_arr'] = $arr;
        
$this->view()->render('home/home'$this->data);
    }
    
    private function 
isTagExists($tag$table) {    
        
Doo::loadModel($table);                
        
$model = new $table;
        
$arr = array('where'=>'tag="'$tag '"');
        
$res $model->find($arr);
        
$isExists true;
        if(empty(
$res)) {
            
$isExists false;
        } 
        return 
$isExists;
    }
    private function 
getClearString($str) {
        return 
stripslashes(htmlspecialchars($str));
    }
    private function 
isFilled($str_arr) {
        
$ret true;
        foreach(
$str_arr as $value) {
            if(empty(
$_POST[$value])) {
                
$ret false;
            }
        }
        return 
$ret;
    }
    private function 
emptyCatalog($dir){        
        foreach(
glob($dir.'*.*') as $v){
            
unlink($v);
        }
    }
}
?>


* Stack Trace...

  1. /home/innamkhi/public_html/index.php(31) calling run()
  2. /home/innamkhi/public_html/dooframework/app/DooWebApp.php(34) calling routeTo()
  3. /home/innamkhi/public_html/dooframework/app/DooWebApp.php(114) calling home()


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


object(DooConfig)#1 (22) {
  
["AUTOLOAD"] => NULL
  
["SITE_PATH"] => string(26"/home/innamkhi/public_html"
  
["PROTECTED_FOLDER"] => string(11"/protected/"
  
["BASE_PATH"] => string(40"/home/innamkhi/public_html/dooframework/"
  
["LOG_PATH"] => NULL
  
["APP_URL"] => string(26"http://innamkhitaryan.com/"
  
["SUBFOLDER"] => string(1"/"
  
["APP_MODE"] => string(3"dev"
  
["AUTOROUTE"] => bool(true)
  [
"DEBUG_ENABLED"] => bool(false)
  [
"ERROR_404_DOCUMENT"] => NULL
  
["ERROR_404_ROUTE"] => string(6"/error"
  
["CACHE_PATH"] => NULL
  
["AUTO_VIEW_RENDER_PATH"] => NULL
  
["MEMCACHE"] => NULL
  
["TEMPLATE_ENGINE"] => string(7"DooView"
  
["TEMPLATE_SHOW_COMMENT"] => NULL
  
["TEMPLATE_ALLOW_PHP"] => NULL
  
["TEMPLATE_COMPILE_ALWAYS"] => NULL
  
["TEMPLATE_GLOBAL_TAGS"] => NULL
  
["MODULES"] => NULL
  
["APP_NAMESPACE_ID"] => NULL
}
$_COOKIE Variables array(0) {
}

BACK TO TOP