Browse Source

Force unhandled quote values to be strings

Nathaniel van Diepen 6 years ago
parent
commit
ba22363884
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pdo.class.php

+ 2 - 2
pdo.class.php

@@ -121,7 +121,7 @@
 			}elseif($type == \PDO::PARAM_NULL){
 				return 'null';
 			}
-			return $this->pdo->quote($value, $type);
+			return $this->pdo->quote((string)$value, $type);
 		}
 		public function beginTransaction(...$args){
 			return $this->pdo->beginTransaction(...$args);
@@ -219,4 +219,4 @@
 			return "constraint `{$name}` foreign key ({$cols0}) references `{$foreignKey['references']}` ({$cols1})";
 		}
 	}
-?>
+?>