Basically im trying to make it possible to upload a new section with or without an image. On line 52 you will see the !file line, yet anytime I try to upload without a file selected, I am hitting the error on line 89. I do not understand why, surely it shouldnt even be getting that far down and when no file is present should be entering the SQL loop?
http://pastebin.com/j2LemcJq
http://pastebin.com/j2LemcJq