Skip to content

PHP error when volume lastwritten is null #277

@fxrb

Description

@fxrb

I'm running bacula-web on two different servers.

Selecting Reports -> Volumes works on server A but fails on server B with "Typed property App\Entity\Bacula\Volume::$lastwritten must not be accessed before initialization" .

Configuration server A (the one that works):
bacula-web: 9.4.4.
PHP: 8.4.16
Result of bacula database query SELECT LastWritten FROM Media:

+---------------------+
| LastWritten         |
+---------------------+
| 2026-01-24 01:12:41 |
| 2026-02-17 01:40:11 |
| 2026-02-20 00:57:57 |
| 2026-02-12 01:23:35 |
| 2026-02-13 00:59:35 |
| 2026-02-07 00:59:53 |
| 2026-02-14 15:49:27 |
| 2026-02-21 01:24:02 |
| 2026-01-31 01:21:02 |
| 2026-02-03 01:27:38 |
| 2025-11-04 13:12:59 |
| 2026-01-06 01:21:48 |
| 2025-12-02 04:04:38 |
+---------------------+

Configuration server B (the one that fails):
bacula-web: 9.4.4.
PHP: 8.2.29
Result of bacula database query SELECT LastWritten FROM Media:

+---------------------+
| LastWritten         |
+---------------------+
| 2026-02-21 01:27:24 |
| 2026-02-17 04:10:09 |
| 2026-02-18 03:29:41 |
| 2026-02-19 03:50:28 |
| 2026-02-20 03:33:47 |
| 2026-02-14 01:24:40 |
| 2026-01-31 03:12:11 |
| 2026-02-07 01:10:34 |
| 2025-08-05 01:28:38 |
| 2025-09-02 01:42:26 |
| 2025-10-07 02:05:25 |
| 2025-11-14 12:53:51 |
| 2025-12-02 16:17:31 |
| 2025-07-08 01:35:29 |
| 2026-01-06 03:20:41 |
| 2026-02-03 02:57:09 |
| NULL                |
| NULL                |
+---------------------+

Might the problem be related to issue #175 since server B (the failing one) has two tapes with a LastWritten field being NULL?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions