We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 716b546 commit 9b8567eCopy full SHA for 9b8567e
src/Log/Prometheus.php
@@ -122,12 +122,9 @@ public function onPhpbuEnd(End $event)
122
$this->write('# HELP phpbu_backup_size The size of the last successful backup' . PHP_EOL);
123
$this->write('# TYPE phpbu_backup_size gauge' . PHP_EOL);
124
foreach ($this->backupStats as $backupName => $backupStats) {
125
- if($this->backupStats[$backupName]['size'] = "") {
126
- $this->backupStats[$backupName]['size'] = 0;
127
- }
128
$this->write(
129
'phpbu_backup_size{name="' . $backupName . '"} ' .
130
- $this->backupStats[$backupName]['size'] .
+ $this->backupStats[$backupName]['size'] = " " ? 0 : $this->backupStats[$backupName]['size'] .
131
PHP_EOL
132
);
133
}
0 commit comments