Welcome Guest, Not a member yet? Register   Sign In
Accessing property from image library class within a view
#1

[eluser]section31[/eluser]
I'm trying to access a property from the image library class within a view and for some reason it's cleared. Why doesn't it have the same value as it did in the controller?

When you load a view from a controller doesn't it add the attach the super object to $this so you can use whatever you were using in the controller in the view?

Can someone clarify this for me, I would like to know what exactly do I have access to from the view?
#2

[eluser]xwero[/eluser]
what are you trying to get?
#3

[eluser]section31[/eluser]
Code:
$this->image_lib->error_msg

In the controller the array is populated, and in the view, it's an empty array()
#4

[eluser]xwero[/eluser]
it not sure it is for public consumption but you can catch it in your controller and add it to the view file data agrument. i had it happen with the validation error string, it's not good debugging but it works Smile
#5

[eluser]section31[/eluser]
true, that does work but i was wondering if someone could explain to me why this doesn't work in technical terms.




Theme © iAndrew 2016 - Forum software by © MyBB