Page 1 of 1

Requesting non-existant ?page= crashes CMS

Posted: Fri Feb 04, 2005 10:01 pm
by BlueRook
I don't know if you are aware of the problem or not but if someone requests a non-existant page then the whole thing will crash.

It gives
Fatal error: Call to a member function on a non-object in /home/WEBSITEROOT/public_html/lib/content.functions.php on line 156
If I have time later I might look into it a bit, but I would think you would be doing some error catching and passing any such pages to display as a 404 or something.

Requesting non-existant ?page= crashes CMS

Posted: Fri Feb 04, 2005 10:20 pm
by BlueRook
From a brief look at the code it doesn't look like you ever test to see if the passed page is a valid alias in the database. Is there somewhere earlier in the code that would be better or would adding a DB query earlier on and testing that be the way to go?