]> granicus.if.org Git - php/commitdiff
Bug #62593 Updated test to verify bindParam doesn't change original value
authorWill Fitch <willfitch@php.net>
Tue, 25 Sep 2012 19:22:24 +0000 (15:22 -0400)
committerDavid Soria Parra <dsp@php.net>
Tue, 30 Oct 2012 13:32:27 +0000 (14:32 +0100)
ext/pdo_pgsql/tests/bug62593.phpt

index 9ad5ff7a0a0228dab39955bab29ed37795880d26..e3ebf46ed53fab8ab4f7077ef6da6a822d7ae225 100644 (file)
@@ -26,8 +26,10 @@ $query->bindValue(':foo', 0, PDO::PARAM_BOOL);
 $query->execute();
 $errors[] = $query->errorInfo();
 
-$value = false;
+// Verify bindParam maintains reference and only passes when execute is called
+$value = true;
 $query->bindParam(':foo', $value, PDO::PARAM_BOOL);
+$value = false;
 $query->execute();
 $errors[] = $query->errorInfo();
 var_dump($value);