Skip to content

Commit 9b8567e

Browse files
authored
Update Prometheus.php
1 parent 716b546 commit 9b8567e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Log/Prometheus.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,9 @@ public function onPhpbuEnd(End $event)
122122
$this->write('# HELP phpbu_backup_size The size of the last successful backup' . PHP_EOL);
123123
$this->write('# TYPE phpbu_backup_size gauge' . PHP_EOL);
124124
foreach ($this->backupStats as $backupName => $backupStats) {
125-
if($this->backupStats[$backupName]['size'] = "") {
126-
$this->backupStats[$backupName]['size'] = 0;
127-
}
128125
$this->write(
129126
'phpbu_backup_size{name="' . $backupName . '"} ' .
130-
$this->backupStats[$backupName]['size'] .
127+
$this->backupStats[$backupName]['size'] = " " ? 0 : $this->backupStats[$backupName]['size'] .
131128
PHP_EOL
132129
);
133130
}

0 commit comments

Comments
 (0)