Skip to content

Commit

Permalink
Merge pull request #16592 from ralphschindler/hotfix/app-rename
Browse files Browse the repository at this point in the history
[5.3] app:name - add file exists check for ModelFactory.php during namespace replacement
  • Loading branch information
taylorotwell authored Dec 1, 2016
2 parents 38612c0 + 4914754 commit 11a2428
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Foundation/Console/AppNameCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ protected function setDatabaseFactoryNamespaces()
*/
protected function replaceIn($path, $search, $replace)
{
$this->files->put($path, str_replace($search, $replace, $this->files->get($path)));
if ($this->files->exists($path)) {
$this->files->put($path, str_replace($search, $replace, $this->files->get($path)));
}
}

/**
Expand Down

0 comments on commit 11a2428

Please sign in to comment.