Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
noblogs-composer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Noblogs
noblogs-composer
Commits
0a8166e4
Commit
0a8166e4
authored
2 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Custom warning handler that dumps stack trace
parent
f8243b5d
No related branches found
Branches containing commit
No related tags found
1 merge request
!209
Add the memcached plugin (object caching)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker/wp-config.php
+13
-0
13 additions, 0 deletions
docker/wp-config.php
with
13 additions
and
0 deletions
docker/wp-config.php
+
13
−
0
View file @
0a8166e4
...
...
@@ -181,6 +181,19 @@ if (array_key_exists('debug_cookie_name', $noblogs_config) &&
define
(
'WP_DEBUG'
,
true
);
define
(
'WP_DEBUG_LOG'
,
true
);
define
(
'WP_DEBUG_DISPLAY'
,
false
);
// Warning handler that dumps stack traces.
class
WarningWithStacktrace
extends
ErrorException
{}
set_error_handler
(
function
(
$severity
,
$message
,
$file
,
$line
)
{
if
(
$severity
&
(
E_WARNING
|
E_NOTICE
|
E_USER_WARNING
|
E_USER_NOTICE
))
{
$ex
=
new
WarningWithStacktrace
(
$message
,
0
,
$severity
,
$file
,
$line
);
echo
"
\n
"
.
$ex
.
"
\n\n
"
;
return
true
;
}
else
{
throw
new
ErrorException
(
$message
,
0
,
$severity
,
$file
,
$line
);
}
});
}
else
{
define
(
'WP_DEBUG'
,
false
);
}
...
...
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