1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 10:15:28 +02:00

Minor code improvements and housekeeping for various core classes and modules

This commit is contained in:
Ryan Cramer
2022-09-23 11:19:51 -04:00
parent d6d68d8cc0
commit b87566d0b3
39 changed files with 960 additions and 741 deletions

View File

@@ -198,7 +198,7 @@ abstract class WireSaveableItemsLookup extends WireSaveableItems {
if($item_id) {
$sql = "INSERT INTO $lookupTable SET {$table}_id=:item_id, $lookupField=:value_id, sort=:sort";
$query = $database->prepare($sql);
foreach($item->getLookupItems() as $key => $value) {
foreach($item->getLookupItems() as $value) {
$value_id = (int) $value->id;
$query->bindValue(":item_id", $item_id, \PDO::PARAM_INT);
$query->bindValue(":value_id", $value_id, \PDO::PARAM_INT);