Active Record Insert not escaping SimpleXML object values |
[eluser]anthrt[/eluser]
http://codeigniter.com/bug_tracker/bug/3386/ Code: $data = array( $xml->characterInfo->character['name'] points to: Code: ["name"]=> It is picked up by CI with the correct value ("Memories") but it does not auto escape it. I've had to add $this->db->escape_str around the variables for them to be escaped (which works).
[eluser]Derek Allard[/eluser]
You're sending an object through an array. You can either pass an array or an object to the function that way.
[eluser]anthrt[/eluser]
I don't quite understand what you mean, why can't CI escape the values in the insert() function? How can I go about getting to do it in the function and not having to manually escape them?
[eluser]Derek Allard[/eluser]
You could probably typecast them as strings instead of objects. Does Code: $data = array( work?
[eluser]anthrt[/eluser]
Thanks Derek, that's done it. Apologies for the mistaken bug report.
[eluser]Derek Allard[/eluser]
Absolutely no need to apologize at all. Thanks for being proactive and involved. See you on the forums. |
Welcome Guest, Not a member yet? Register Sign In |