Skip to content

Update TP: PHP - 75_buffer #38

@felix-20

Description

@felix-20

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ACK_WAITINGissue to be reviewed and confirmedUPDATE_TPissue is about updating a testability pattern

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions