Skip to content

Commit d5a7d61

Browse files
authored
Merge pull request #46 from stellarwp/fix/error-on-update-evaluation
Fixing error during update evaluation
2 parents e7705d7 + d702966 commit d5a7d61

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file. This project adhere to the [Semantic Versioning](http://semver.org/) standard.
44

5+
## [3.1.2] 2025-10-02
6+
7+
* Fix - Fix the `update_many` method to properly check if the transaction was successful.
8+
9+
[3.1.2]: https://github.com/stellarwp/schema/releases/tag/3.1.2
10+
511
## [3.1.1] 2025-10-01
612

713
* Tweak - Fix the `get_all_by` method to accept an order by clause.

src/Schema/Traits/Custom_Table_Query_Methods.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ public static function update_many( array $entries ): bool {
392392
$results[] = $database::query( $query );
393393
}
394394

395-
$all_good = count( array_filter( $results ) ) === count( $results );
395+
$all_good = count( array_filter( $results, static fn( $result ) => $result !== false ) ) === count( $results );
396396

397397
if ( ! $all_good ) {
398398
$database::rollBack();

0 commit comments

Comments
 (0)