Explorar o código

Force unhandled quote values to be strings

Nathaniel van Diepen %!s(int64=6) %!d(string=hai) anos
pai
achega
ba22363884
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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})";
 		}
 	}
-?>
+?>