Strange callback validation error for an array |
[eluser]Isos[/eluser]
In a user profile, user is asked to check at least 5 checkboxes out of 30. The checkboxes are named as discplines[] as following: Code: <input type="checkbox" name="disciplines[]" value="<?$discipline->id;?>" /> So I created a callback functions as following: Code: function _check_if_more_than_five($str){ The good thing about this is that it works, but the bugging ugly thing is that I get this error at the top of the page: A PHP Error was encountered Severity: Notice Message: Array to string conversion Filename: libraries/Validation.php Line Number: 709 Where Line Number: 709 in libraries/Validation.php is as following: Code: return str_replace(array("'", '"', '<', '>'), array("'", """, '<', '>'), stripslashes($data)); Code: /** I am trying to figure out what's wrong and how I may solve this. But, when it comes to manipulating a ci script to solve a problem I tend to consult in here. Any help will be appreciated. Thanks.
[eluser]Isos[/eluser]
Oh! Thanks to search I found the solution here: http://ellislab.com/forums/viewthread/72192/ so don't bother .. thanks. |
Welcome Guest, Not a member yet? Register Sign In |