Skip to content

bind* Rule #275

Open
Open
@staabm

Description

@staabm

create a PHPStan-Rule which errors on bindValue/.. calls, when parameters are passed to execute

Originally posted by @staabm in #265 (comment)

Example by xPaw

	$st = Container::Database()->prepare( 'SELECT * FROM Apps WHERE AppID = :a OR AppID = :b' );
	$st->bindValue( ':a', 123 );
	$st->execute( [ ':b' => 456 ] ); // SQLSTATE[HY093]: Invalid parameter number

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions