Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Is ORM encoding values?
  • I am serializing array to store it in database using ORM. Then I surprisingly find out that unserialize() doesn't work, giving me unserialize - error at index error. Playing around I figure out I need to do this to work: $array = unserialize( $model->images ); //wont work
    $array = unserialize(html_entity_decode($model->images, ENT_QUOTES)); //will work Normaly this would work, but using Fuel's ORM it doesn't. Thx on explanation.
  • If this is in a view you probably missed this part of the docs: http://docs.fuelphp.com/general/views.html#/security If it's in the database as such you probably passed it to the view and saved it after it had been encoded for output.
  • Thanks for pointing that out. I missed it of-course.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion