Kaynağa Gözat

Add a try catch to the menu include loop.

Mark Crane 10 yıl önce
ebeveyn
işleme
962e084852
1 değiştirilmiş dosya ile 8 ekleme ve 2 silme
  1. 8 2
      resources/classes/menu.php

+ 8 - 2
resources/classes/menu.php

@@ -54,8 +54,14 @@
 					$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_menu.php");
 					$x=0;
 					foreach ($config_list as &$config_path) {
-						include($config_path);
-						$x++;
+						try {
+							include($config_path);
+							$x++;
+						}
+						catch (Exception $e) {
+							echo 'exception caught: ' . $e->getMessage() . "\n";
+							exit;
+						}
 					}
 
 				//begin the transaction