Small optimisations.

This commit is contained in:
James Cole
2016-08-12 15:27:44 +02:00
parent 5c4d010bde
commit 2947ec0002
3 changed files with 102 additions and 95 deletions

View File

@@ -51,7 +51,7 @@ class EncryptFile extends Command
*/
public function handle()
{
$file = e($this->argument('file'));
$file = e(strval($this->argument('file')));
if (!file_exists($file)) {
$this->error(sprintf('File "%s" does not seem to exist.', $file));
@@ -59,7 +59,7 @@ class EncryptFile extends Command
}
$content = file_get_contents($file);
$content = Crypt::encrypt($content);
$newName = $this->argument('key') . '.upload';
$newName = e($this->argument('key')) . '.upload';
$path = storage_path('upload') . '/' . $newName;
file_put_contents($path, $content);