Open kekstlt opened 3 months ago
Patch
diff --git a/src/MySQLReplication/Event/RowEvent/RowEvent.php b/src/MySQLReplication/Event/RowEvent/RowEvent.php
index e20c6e9..607b387 100644
--- a/src/MySQLReplication/Event/RowEvent/RowEvent.php
+++ b/src/MySQLReplication/Event/RowEvent/RowEvent.php
@@ -683,7 +683,7 @@ class RowEvent extends EventCommon
$date = DateTime::createFromFormat('YmdHis', $value)->format('Y-m-d H:i:s');
$dateLastErrors = DateTime::getLastErrors();
- if ($dateLastErrors && array_sum($dateLastErrors) > 0) {
+ if ($dateLastErrors && ($dateLastErrors['warning_count'] + $dateLastErrors['error_count']) > 0) {
return null;
}
@@ -725,7 +725,7 @@ class RowEvent extends EventCommon
return null;
}
$dateLastErrors = DateTime::getLastErrors();
- if ($dateLastErrors && array_sum($dateLastErrors) > 0) {
+ if ($dateLastErrors && ($dateLastErrors['warning_count'] + $dateLastErrors['error_count']) > 0) {
return null;
}
Problem with migration to PHP8.3
$dateLastErrors
in this case isSo arrays now cant be summed with arrays