Skip to content

Commit

Permalink
As PHP8.1 debug_print_backtrace() does not include argument values
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaloyan (KT) Tsvetkov committed Mar 9, 2024
1 parent 9b5c8a5 commit a967df2
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions tests/Masked/ProtectValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ function test_protect_backtrace()
var_export(Protect::protect($dummy), true),
$username,
$password);

$dummy = $this->edno($username, $password);
$this->assertBacktrace(Protect::protect($dummy), $username, $password);
}

function assertBacktrace($redacted, $username, $password)
Expand All @@ -104,7 +101,6 @@ function assertBacktrace($redacted, $username, $password)
$this->assertFalse(
strpos($redacted, $password)
);

$this->assertIsInt(
strpos($redacted, Redact::redact( $username ))
);
Expand All @@ -123,17 +119,4 @@ function due($username, $password)
unset($username, $password);
return debug_backtrace();
}

function edno($username, $password)
{
return $this->dve($username, $password);
}

function dve($username, $password)
{
unset($username, $password);
ob_start();
debug_print_backtrace();
return ob_get_clean();
}
}

0 comments on commit a967df2

Please sign in to comment.