Skip to content

Commit

Permalink
Dont backup null points
Browse files Browse the repository at this point in the history
  • Loading branch information
addshore committed Nov 16, 2015
1 parent 817e858 commit b0c96ee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions GraphiteBackup.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit b0c96ee

Please sign in to comment.