Explorar o código

Zezwolenie na dodawanie pustych rekordów (z samymi ID) przy pomocy funkcji getPDO()->insert

Mariusz Muszyński %!s(int64=8) %!d(string=hai) anos
pai
achega
6fc19eba62
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      SE/se-lib/Core/Pdo.php

+ 1 - 1
SE/se-lib/Core/Pdo.php

@@ -510,7 +510,7 @@ EOF_STRUCT_MYSQL;
 
 	public function insert($tableName, $item, $sqlSchema = []) {// @returns int last inserted id
 		if (empty($tableName)) throw new Exception("Missing table name");
-		if (empty($item) || !is_array($item)) throw new Exception("Missing item");
+		if (!is_array($item)) throw new Exception("Missing item");
 		$sqlFields = [];
 		$sqlValues = [];
 		foreach ($item as $field => $val) {