Testability pattern
75_buffer
Problem statement
There is not really a problem with the current pattern, this is just a suggestion for a new instance.
According to this there is the function ob_get_clean(), that executes executes both ob_get_contents() and ob_end_clean().
That function is not yet captured by this pattern.
Proposed changes
Introduce a new instance with the following code:
$a = $_GET["p1"]; // source
ob_start();
echo $a;
$x = ob_get_clean();
echo $x; // sink
It is very similar to the first instance, but it only uses one function instead of two.
Testability pattern
75_buffer
Problem statement
There is not really a problem with the current pattern, this is just a suggestion for a new instance.
According to this there is the function
ob_get_clean(), that executes executes bothob_get_contents()andob_end_clean().That function is not yet captured by this pattern.
Proposed changes
Introduce a new instance with the following code:
It is very similar to the first instance, but it only uses one function instead of two.