1
0
mirror of https://github.com/danog/amp.git synced 2024-11-30 04:29:08 +01:00

Check against "false"

This commit is contained in:
Aaron Piotrowski 2017-12-02 11:15:06 -06:00
parent e3b0b9a0c7
commit 4ef9af6dff
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB
2 changed files with 4 additions and 2 deletions

View File

@ -94,7 +94,8 @@ trait Placeholder {
}
\assert((function () {
if (\getenv("AMP_DEBUG") || (\defined("AMP_DEBUG") && \AMP_DEBUG)) {
$env = \getenv("AMP_DEBUG");
if (($env !== "0" && $env !== "false") || (\defined("AMP_DEBUG") && \AMP_DEBUG)) {
$trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS);
\array_shift($trace); // remove current closure
$this->resolutionTrace = $trace;

View File

@ -154,7 +154,8 @@ trait Producer {
}
\assert((function () {
if (\getenv("AMP_DEBUG") || (\defined("AMP_DEBUG") && \AMP_DEBUG)) {
$env = \getenv("AMP_DEBUG");
if (($env !== "0" && $env !== "false") || (\defined("AMP_DEBUG") && \AMP_DEBUG)) {
$trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS);
\array_shift($trace); // remove current closure
$this->resolutionTrace = $trace;