diff --git a/includes/YesWikiLoader.php b/includes/YesWikiLoader.php index e540c303c..7f78b1366 100644 --- a/includes/YesWikiLoader.php +++ b/includes/YesWikiLoader.php @@ -13,6 +13,7 @@ namespace YesWiki\Core; use Doctrine\Common\Annotations\AnnotationRegistry; +use Exception; use Throwable; use YesWiki\Wiki; @@ -33,13 +34,12 @@ public static function getWiki(bool $test = false): Wiki if (is_null(self::$wiki)) { require_once 'includes/autoload.inc.php'; try { - $loader = require_once 'vendor/autoload.php'; - } catch (Throwable $th) { - $message = ""; if (!file_exists('vendor/autoload.php')) { - $message .= "ERROR ! : Folder `vendor/` seems not to be entirely copied ! (Maybe a YesWiki update aborted before its end !)
Could you manually copy the folder `vendor/` on your server by ftp ?
"; + throw new Exception("ERROR ! : Folder `vendor/` seems not to be entirely copied ! (Maybe a YesWiki update aborted before its end !)
Could you manually copy the folder `vendor/` on your server by ftp ?
"); } - $message .= $th->getMessage(); + $loader = require_once 'vendor/autoload.php'; + } catch (Throwable $th) { + $message = $th->getMessage(); // echo message directly because TemplateEngine not ready here echo "
$message
"; exit();