diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c6a2d44..61f5a1a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -70,7 +70,6 @@ jobs: env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - composer require "php-coveralls/php-coveralls:^2" --dev -W - ls ./vendor/bin + composer require "php-coveralls/php-coveralls:^2" --dev -q -W ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml ./vendor/bin/php-coveralls -v \ No newline at end of file diff --git a/src/MySQLReplication/Event/RowEvent/RowEvent.php b/src/MySQLReplication/Event/RowEvent/RowEvent.php index e5ab292..e20c6e9 100644 --- a/src/MySQLReplication/Event/RowEvent/RowEvent.php +++ b/src/MySQLReplication/Event/RowEvent/RowEvent.php @@ -682,7 +682,8 @@ protected function getDatetime(): ?string } $date = DateTime::createFromFormat('YmdHis', $value)->format('Y-m-d H:i:s'); - if (array_sum(DateTime::getLastErrors()) > 0) { + $dateLastErrors = DateTime::getLastErrors(); + if ($dateLastErrors && array_sum($dateLastErrors) > 0) { return null; }