IW. Can I replace undefined index response with a 404 error?

4 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: July 16, 2012   (RSS)

By JeffC - July 13, 2012

I am using the Instant Website plugin

After a page has been removed and revisited it displays the php error 'Notice: Undefined index: name in...' message.

Instead of displaying the php error I would like to either:

Direct to a custom 404

or, even better

Replace the php error with a more friendly descriptive message such as 'this page has been removed'

Is this possible? Any help appreciated

Thanks
Jeff

Re: [Jason] IW. Can I replace undefined index response with a 404 error?

By JeffC - July 13, 2012 - edited: July 15, 2012

Hi Jason

The block of code you posted wasn't in my website_init.php. Maybe I have a earlier version of the addon or maybe I removed it by accident. Either way adding this code makes everything work. Thanks for your help.
Jeff

Re: [Jeffncou] IW. Can I replace undefined index response with a 404 error?

By Jason - July 16, 2012

No problem. Glad to hear everything is working now.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/