samedi 18 avril 2015

codeigniter error log file only shows notice error but error msg not shows on screen

I have been literally pulling my hair out with this one and its beginning to delay the rest of my project and it really is getting me down.


Why would codeigniter show errors in application/logs such as:



ERROR - 2015-04-18 12:03:24 --> 404 Page Not Found --> uploaded_img

ERROR - 2015-04-18 12:03:24 --> 404 Page Not Found --> images

ERROR - 2015-04-18 12:03:24 --> 404 Page Not Found --> images

// Above all three errors are shows only when i visit home page of my website and I am not calling any type of images class

ERROR - 2015-04-18 11:30:14 --> Severity: Notice --> Trying to get property of non-object D:\wamp\www\mywebsite\application\views\product_detail.php 2

ERROR - 2015-04-18 11:30:14 --> Severity: Notice --> Trying to get property of non-object D:\wamp\www\mywebsite\application\views\product_detail.php 3

ERROR - 2015-04-18 11:30:14 --> Severity: Notice --> Trying to get property of non-object D:\wamp\www\mywebsite\application\views\product_detail.php 4

// Above all three errors are shown when i view product description page of my website.


My index.php is set at:



error_reporting(E_ALL | E_STRICT)


and config :



$config['log_threshold'] = 1;


The main point is that it's only showing me a notice error and 404 Error.


Here is my Product controller class code:



class Product extends Frontend_Controller{

public function __construct(){
parent::__construct();
$this->load->model('product_m');
$this->load->library('cart');
}

public function index($str){
// fetch the article
$this->data['product_info'] = $this->product_m->get_product_detail($str);

// creating breadcrumb navigation path
$this->data['main_category'] = $this->uri->segment(1);
$this->data['sub_category'] = $this->uri->segment(2);
$this->data['current_location'] = str_replace('-', ' ',str_replace('.html', '', $this->uri->segment(3)));

// load view
$this->load->view('product_detail',$this->data);
}


}


Here is product_description.php code where its show's error:



$total_product = (int) $product_info->quantity;
$mrp_price = (int) $product_info->price;
$offer_price = (int) $product_info->offer_price;


What should i do to remove these error?


Aucun commentaire:

Enregistrer un commentaire