Requesting non-existant ?page= crashes CMS

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
BlueRook

Requesting non-existant ?page= crashes CMS

Post 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.
BlueRook

Requesting non-existant ?page= crashes CMS

Post 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?
Locked

Return to “CMSMS Core”