mirror of
https://github.com/danog/amp.git
synced 2024-11-26 20:15:00 +01:00
Don't record stack traces in case of AMP_DEBUG not being set
Fixes #217.
This commit is contained in:
parent
c632e40b03
commit
8399301b5b
@ -94,7 +94,7 @@ trait Placeholder {
|
||||
}
|
||||
|
||||
\assert((function () {
|
||||
$env = \getenv("AMP_DEBUG");
|
||||
$env = \getenv("AMP_DEBUG") ?: "0";
|
||||
if (($env !== "0" && $env !== "false") || (\defined("AMP_DEBUG") && \AMP_DEBUG)) {
|
||||
$trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||
\array_shift($trace); // remove current closure
|
||||
|
@ -154,7 +154,7 @@ trait Producer {
|
||||
}
|
||||
|
||||
\assert((function () {
|
||||
$env = \getenv("AMP_DEBUG");
|
||||
$env = \getenv("AMP_DEBUG") ?: "0";
|
||||
if (($env !== "0" && $env !== "false") || (\defined("AMP_DEBUG") && \AMP_DEBUG)) {
|
||||
$trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||
\array_shift($trace); // remove current closure
|
||||
|
Loading…
Reference in New Issue
Block a user