form validation error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: form validation error (/showthread.php?tid=49695) |
form validation error - El Forum - 02-29-2012 [eluser]the_unforgiven[/eluser] Hi All, I'm getting this error: A PHP Error was encountered Severity: Notice Message: Trying to get property of non-object Filename: libraries/Form_validation.php Line Number: 320 Fatal error: Call to a member function load() on a non-object in /home/site/public_html/system/libraries/Form_validation.php on line 320 Here's the controller Code: function send() I have tried commenting out line by line but still no joy then if i comment out them all it does kinda work, just wondering why this is not working can anyone shed some light on this for me? Help much appreciated. form validation error - El Forum - 02-29-2012 [eluser]the_unforgiven[/eluser] Anyone? form validation error - El Forum - 02-29-2012 [eluser]Mauricio de Abreu Antunes[/eluser] Did you load form_validation? :-) form validation error - El Forum - 02-29-2012 [eluser]the_unforgiven[/eluser] Yes via autoload.php Code: | ------------------------------------------------------------------- form validation error - El Forum - 02-29-2012 [eluser]Mauricio de Abreu Antunes[/eluser] Comment out your send() call, please. Even that function is being called from a form. form validation error - El Forum - 02-29-2012 [eluser]the_unforgiven[/eluser] I commented out the send() function and got a 404 then cos the page contact/send doesn't exsist form validation error - El Forum - 02-29-2012 [eluser]Mauricio de Abreu Antunes[/eluser] Ah, ok! Forget my idea. Please, try to load form_validation in your controller. form validation error - El Forum - 02-29-2012 [eluser]the_unforgiven[/eluser] Added both: $this->load->helper(array('form', 'url')); $this->load->library('form_validation'); in controller but still same error. form validation error - El Forum - 02-29-2012 [eluser]Matalina[/eluser] It looks like you are trying to load on something that is not a ci object. Your form validation is being called other wise the library wouldn't be giving you the error. My guess is that something in your view is wrong. form validation error - El Forum - 02-29-2012 [eluser]Mauricio de Abreu Antunes[/eluser] Show your view, please. How is your "validation_errors" in your view? |