File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed
src/CoreBundle/Resources/views/Exception Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change 6
6
use Patchwork \Utf8 \Bootup ;
7
7
use Symfony \Component \Dotenv \Dotenv ;
8
8
use Symfony \Component \ErrorHandler \Debug ;
9
+ use Symfony \Component \HttpFoundation \Request ;
9
10
use Symfony \Component \HttpFoundation \Session \Flash \FlashBag ;
10
11
11
12
/**
16
17
require_once __DIR__ .'/../../../vendor/autoload.php ' ;
17
18
18
19
try {
19
- // Check the PHP version
20
- api_check_php_version ();
21
20
22
21
// Get settings from .env.local file created.
23
22
$ envFile = __DIR__ .'/../../../.env.local ' ;
29
28
}
30
29
31
30
$ env = $ _SERVER ['APP_ENV ' ] ?? 'dev ' ;
32
- //Debug::enable();
33
- $ kernel = new Chamilo \Kernel ($ env , true );
31
+ $ debug = 'dev ' === $ env ;
32
+ if ($ debug ) {
33
+ Debug::enable ();
34
+ }
35
+
36
+ $ kernel = new Chamilo \Kernel ($ env , $ debug );
34
37
// Loading Request from Sonata. In order to use Sonata Pages Bundle.
35
- $ request = \ Symfony \ Component \ HttpFoundation \ Request::createFromGlobals ();
38
+ $ request = Request::createFromGlobals ();
36
39
37
40
// This 'load_legacy' variable is needed to know that symfony is loaded using old style legacy mode,
38
41
// and not called from a symfony controller from public/
65
68
66
69
$ container = $ kernel ->getContainer ();
67
70
71
+ // Load legacy configuration.php
68
72
if ($ kernel ->isInstalled ()) {
69
73
require_once $ kernel ->getConfigurationFile ();
70
74
} else {
Original file line number Diff line number Diff line change 1
1
{% extends ' @ChamiloCore/Layout/base-layout.html.twig' %}
2
2
{% block page_content %}
3
- <div class =" error-page" >
4
- <div class =" error-content" >
5
- {{ exception .message }}
6
- </div >
3
+ <div
4
+ id =" app"
5
+ >
7
6
</div >
7
+ <section id =" sectionMainContent" class =" section-content" >
8
+ <div class =" jumbotron jumbotron-fluid" >
9
+ <div class =" container" >
10
+ <h1 class =" display-4" >Error</h1 >
11
+ <p class =" lead" > {{ exception .message }}</p >
12
+ </div >
13
+ </div >
14
+ </section >
8
15
{% endblock %}
You can’t perform that action at this time.
0 commit comments