CodeIgniter Forums

Full Version: Message: Undefined property: ::$input or $uri
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
Well after 3 hours I finally solved it.
I'm new to codeigniter soo, I had to look core codes to understand the reason.
The loader doesnt load them as "input" or "uri"

The result of
Code:
$this->load->_base_classes
that used in Controller class to load base classes is:

Code:
Array
(
    [benchmark] => Benchmark
    [hooks] => Hooks
    [config] => Config
    [utf8] => Utf8
    [urI] => URI
    [router] => Router
    [output] => Output
    [Input] => Input
    [lang] => Lang
    [loader] => Loader
)

So loader load them as "urI" and "Input"

I dont know why it does like that but using
Code:
$this->Input->post("post") | $this->urI->segment(2)
instead of
Code:
$this->input->post("post") | $this->uri->segment(2)
works at Codeigniter 2.0

Can you guys know why it does this?

El Forum

[eluser]InsiteFX[/eluser]
Maybe read the CodeIgniter User Guide!

You need to load the uri helper in your application/config/autoload.php

InsiteFX

El Forum

[eluser]Unknown[/eluser]
For the people who have the same problem

Replacing this
Code:
$_is_loaded[strtolower($class)] = $class;
with this
Code:
$_is_loaded[mb_strtolower($class, 'UTF-8')] = $class;

at system/core/Common.php line 196

solves the problem

El Forum

[eluser]InsiteFX[/eluser]
You should never modify a system core file!

Report it as a bug to the Reactor Team to get it fixed!

Report Bugs