I am new in Codeigniter And I have no knowldge about Anything in it. This is my Code Snippent Error .

A PHP Error was encountered
Severity: Notice

Message: Undefined property: stdClass::$theme

Filename: core/MY_Controller.php

Line Number: 117

Backtrace:

File: D:\xampp\htdocs\rms\application\core\MY_Controller.php
Line: 117
Function: _error_handler

File: D:\xampp\htdocs\rms\application\core\MY_Controller.php
Line: 72
Function: _setup

File: D:\xampp\htdocs\rms\index.php
Line: 337
Function: require_once

Recommended Answers

All 4 Replies

Something seems to be seriously wrong with the new discussion creation. Folk are picking the code snippet topic when that's for solid examples or tutorials. Not for questions.

Can you help by telling us why you choose this format for posting?

Sooooo many people used to inaccurately pick the code snippet format when they had a question, that eventually I had to switch it to where only senior community members could post code snippets. However, in doing so, the number of valid new code snippets dropped by like 90%, which is the way it's been for the past 5+ years. In an effort to get more people contributing again, I removed the strict limitation to who can post code snippets. We're back to taking the good with the bad.

That being said ... Maulik, I've modified your discussion thread to no longer be a code snippet in our code snippet library. Basically you're calling a variable something like $variable->theme and it's saying that $variable does not have a property called $theme. If you show us your MY_Controller.php code, I might be able to help. The problem seems to be line 117 of that file.

That being said, you say you're new to CodeIgniter, yet the only reason to have your own custom MY_Controller.php file is if you are trying to overwrite the default Controller class that's native to CodeIgniter.

I think the problem is that people see Code Snippet in the drop down and think that because they are including a snippet of code with their question they should select that option.

  • Captain Obvious
commented: ...meets Captain Oblivious. I sense a lot of folk don't put effort into their questions. +15

Maulik_4, can you show us MY_Controller.php please so that I can help?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.