--- a/index.php
+++ b/index.php
@@ -1,5 +1,15 @@
 <?php
 // $Id: index.php,v 1.94 2007/12/26 08:46:48 dries Exp $
+function check_shutdown() {
+ $lasterror = error_get_last();
+if (( $lasterror['type'] == E_ERROR) || ($lasterror['type'] == E_PARSE) ){
+   print("Sorry, this page has encountered a fatal error. Please contact a site administrator and try again later.");
+  } else {
+    // Do nothing
+ }
+}
+//Register the shutdown
+register_shutdown_function('check_shutdown');
 
 /**
  * @file
