Ensure the resource manager exists when displaying an error message
[gitphp.git] / index.php
blob:a/index.php -> blob:b/index.php
--- a/index.php
+++ b/index.php
@@ -89,6 +89,14 @@
 		throw $e;
 	}
 
+	if (GitPHP_Resource::GetInstance() == null) {
+		/*
+		 * In case an error was thrown before instantiating
+		 * the resource manager
+		 */
+		GitPHP_Resource::Instantiate('en_US');
+	}
+
 	require_once(GITPHP_CONTROLLERDIR . 'Controller_Message.class.php');
 	$controller = new GitPHP_Controller_Message();
 	$controller->SetParam('message', $e->getMessage());

comments