diff options
author | Simon Rettberg | 2022-05-11 11:32:29 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-05-11 11:32:29 +0200 |
commit | 7493d9496e96278726bd94b1d12770124c3f63a1 (patch) | |
tree | d181469adf0a9dcbfd7f16ddae7192bb8eb4df26 /inc/event.inc.php | |
parent | [baseconfig_bwlp] Add SLX_DHCP_OTHER_NICS (diff) | |
download | slx-admin-7493d9496e96278726bd94b1d12770124c3f63a1.tar.gz slx-admin-7493d9496e96278726bd94b1d12770124c3f63a1.tar.xz slx-admin-7493d9496e96278726bd94b1d12770124c3f63a1.zip |
[vmstore] Add types where possible and do false -> null
Diffstat (limited to 'inc/event.inc.php')
-rw-r--r-- | inc/event.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/event.inc.php b/inc/event.inc.php index 2d916b48..57b4871e 100644 --- a/inc/event.inc.php +++ b/inc/event.inc.php @@ -45,7 +45,7 @@ class Event // Check status of all tasks // Mount vm store - if ($mountId === false) { + if ($mountId === null) { EventLog::info('No VM store type defined.'); $everythingFine = false; } else { @@ -58,7 +58,7 @@ class Event $everythingFine = false; } // iPXE generation - if ($ipxeId === false) { + if ($ipxeId === null) { EventLog::failure('Cannot generate PXE menu: Taskmanager unreachable!'); $everythingFine = false; } else { @@ -78,10 +78,10 @@ class Event $mountId = Trigger::mount(); $mountStatus = Taskmanager::waitComplete($mountId, 10000); } - if ($mountId !== false && Taskmanager::isFailed($mountStatus)) { + if ($mountId !== null && Taskmanager::isFailed($mountStatus)) { EventLog::failure('Mounting VM store failed', $mountStatus['data']['messages'] ?? ''); $everythingFine = false; - } elseif ($mountId !== false && !Taskmanager::isFinished($mountStatus)) { + } elseif ($mountId !== null && !Taskmanager::isFinished($mountStatus)) { // TODO: Still running - create callback } |