Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3174996
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3174996
Commits
f8d09132
Commit
f8d09132
authored
11 years ago
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2159459
by sun: Rebuild script triggers errors in error handler, fails to rebuild container.
parent
7240b39b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/includes/errors.inc
+8
-6
8 additions, 6 deletions
core/includes/errors.inc
core/includes/utility.inc
+11
-0
11 additions, 0 deletions
core/includes/utility.inc
with
19 additions
and
6 deletions
core/includes/errors.inc
+
8
−
6
View file @
f8d09132
...
...
@@ -373,12 +373,14 @@ function format_backtrace(array $backtrace) {
else
{
$call
[
'function'
]
=
'main'
;
}
foreach
(
$trace
[
'args'
]
as
$arg
)
{
if
(
is_scalar
(
$arg
))
{
$call
[
'args'
][]
=
is_string
(
$arg
)
?
'\''
.
filter_xss
(
$arg
)
.
'\''
:
$arg
;
}
else
{
$call
[
'args'
][]
=
ucfirst
(
gettype
(
$arg
));
if
(
isset
(
$trace
[
'args'
]))
{
foreach
(
$trace
[
'args'
]
as
$arg
)
{
if
(
is_scalar
(
$arg
))
{
$call
[
'args'
][]
=
is_string
(
$arg
)
?
'\''
.
filter_xss
(
$arg
)
.
'\''
:
$arg
;
}
else
{
$call
[
'args'
][]
=
ucfirst
(
gettype
(
$arg
));
}
}
}
$return
.
=
$call
[
'function'
]
.
'('
.
implode
(
', '
,
$call
[
'args'
])
.
")
\n
"
;
...
...
This diff is collapsed.
Click to expand it.
core/includes/utility.inc
+
11
−
0
View file @
f8d09132
...
...
@@ -34,6 +34,12 @@ function drupal_var_export($var, $prefix = '') {
* @see rebuild.php
*/
function
drupal_rebuild
()
{
// Remove Drupal's error and exception handlers; they rely on a working
// service container and other subsystems and will only cause a fatal error
// that hides the actual error.
restore_error_handler
();
restore_exception_handler
();
// drupal_bootstrap(DRUPAL_BOOTSTRAP_KERNEL) will build a new kernel. This
// comes before DRUPAL_BOOTSTRAP_PAGE_CACHE.
PhpStorageFactory
::
get
(
'service_container'
)
->
deleteAll
();
...
...
@@ -50,4 +56,9 @@ function drupal_rebuild() {
drupal_bootstrap
(
DRUPAL_BOOTSTRAP_FULL
);
drupal_flush_all_caches
();
// Restore Drupal's error and exception handlers.
// @see _drupal_bootstrap_configuration()
set_error_handler
(
'_drupal_error_handler'
);
set_exception_handler
(
'_drupal_exception_handler'
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment