From 18455d64762d3278330485d35ac0bcee3e392e1f Mon Sep 17 00:00:00 2001 From: Dimitrios Pantazis Date: Thu, 2 Oct 2025 00:09:21 +0300 Subject: [PATCH 1/2] Fixing error during update evaluation --- src/Schema/Traits/Custom_Table_Query_Methods.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Schema/Traits/Custom_Table_Query_Methods.php b/src/Schema/Traits/Custom_Table_Query_Methods.php index 76bc4a4..d7383b3 100644 --- a/src/Schema/Traits/Custom_Table_Query_Methods.php +++ b/src/Schema/Traits/Custom_Table_Query_Methods.php @@ -392,7 +392,7 @@ public static function update_many( array $entries ): bool { $results[] = $database::query( $query ); } - $all_good = count( array_filter( $results ) ) === count( $results ); + $all_good = count( array_filter( $results, static fn( $result ) => $result !== false ) ) === count( $results ); if ( ! $all_good ) { $database::rollBack(); From d7029661539294b0b161efc9fad90ef0c78a97bc Mon Sep 17 00:00:00 2001 From: Dimitrios Pantazis Date: Thu, 2 Oct 2025 00:23:38 +0300 Subject: [PATCH 2/2] added changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e30dad..cd0f4fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. This project adhere to the [Semantic Versioning](http://semver.org/) standard. +## [3.1.2] 2025-10-02 + +* Fix - Fix the `update_many` method to properly check if the transaction was successful. + +[3.1.2]: https://github.com/stellarwp/schema/releases/tag/3.1.2 + ## [3.1.1] 2025-10-01 * Tweak - Fix the `get_all_by` method to accept an order by clause.