converDate() throws error if date it null

Created on 26 August 2024, 3 months ago

Problem/Motivation

In the event that a BatchOperation runs but is stopped by a debugger, it is possible to end up with a batch operation log that has no run-date. If this happens there is fatal error.

The website encountered an unexpected error. Try again later.

InvalidArgumentException: The timestamp must be numeric. in Drupal\Component\Datetime\DateTimePlus::createFromTimestamp() (line 201 of core/lib/Drupal/Component/Datetime/DateTimePlus.php).
Drupal\Core\Datetime\DateFormatter->format(NULL, 'medium') (Line: 222)
Drupal\codit_batch_operations_ui\Controller\OperationsBase->convertDate(Array) (Line: 169)

This will not happen in normal use of the module . It is only possible with the right combination of debugging and stopping a debugging session before completing the processing of one item.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States swirt Florida

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024