Undefined variable / index fix |
Hello,
I am trying to program a form in Codeigniter 4 that I can use for both create and edit functionality. For the edit function I use the variable $data to fill the fields, this variable is empty when you are on the create form. This gives me an "Undefined variable: data" error. In Codeigniter 3 this was only an announcement but the website continued to work. With Codeigniter 4 I can't get the site to function with an empty variable. Is there an easy way to avoid this error with an empty variable? It is very annoying to make an extensive if isset function with every variable. |
Messages In This Thread |
Undefined variable / index fix - by creativeking - 06-11-2020, 10:41 AM
RE: Undefined variable / index fix - by InsiteFX - 06-12-2020, 03:07 AM
|