Browse Source

use the correct function

El RIDO 4 năm trước cách đây
mục cha
commit
47deaeb7ca
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      lib/Data/Database.php

+ 3 - 3
lib/Data/Database.php

@@ -548,11 +548,11 @@ class Database extends AbstractData
             foreach ($params as $key => $parameter) {
                 $position = $key + 1;
                 if (is_int($parameter)) {
-                    $statement->bindParam($position, $parameter, PDO::PARAM_INT);
+                    $statement->bindValue($position, $parameter, PDO::PARAM_INT);
                 } elseif ($length = strlen($parameter) >= 4000) {
-                    $statement->bindParam($position, $parameter, PDO::PARAM_STR, $length);
+                    $statement->bindValue($position, $parameter, PDO::PARAM_STR, $length);
                 } else {
-                    $statement->bindParam($position, $parameter);
+                    $statement->bindValue($position, $parameter);
                 }
             }
             $result = $statement->execute();