diff --git a/GraphiteBackup.php b/GraphiteBackup.php index 6a9ee6b..5aa327c 100644 --- a/GraphiteBackup.php +++ b/GraphiteBackup.php @@ -38,8 +38,11 @@ private function executeTargetInput( $targetInput ) { list( $value, $timestamp ) = $dataPoint; $stringToAdd = $timestamp . ' ' . $value . "\n"; - // Don't write the line if we already have an exact duplicate - if ( strpos( $currentFileContents, $stringToAdd ) !== false ) { + // Don't write the line if we already have an exact duplicate or it is null + if ( + $value == '' || + strpos( $currentFileContents, $stringToAdd ) !== false + ) { $dataPointsSkipped++; continue; }