Skip to content

Commit

Permalink
fixed fileGet when file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Dec 26, 2016
1 parent 02019cd commit c71fd6f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,15 @@ public static function writeFile($path, array $data)

/**
* Writes file if content changed.
* @param string $path
* @param string $content
* @param string $path
* @param string $content
*/
public static function putFile($path, $content)
protected static function putFile($path, $content)
{
if ($content !== file_get_contents($path)) {
file_put_contents($path, $content);
if (file_exists($path) && $content = file_get_contents($path)) {
return;
}
file_put_contents($path, $content);
}

/**
Expand Down

0 comments on commit c71fd6f

Please sign in to comment.