Skip to content

Commit

Permalink
5.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
aliyilmaz committed Apr 29, 2023
1 parent 3cb14e6 commit 7c0ee06
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Mind.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
*
* @package Mind
* @version Release: 5.6.6
* @version Release: 5.6.7
* @license GPL3
* @author Ali YILMAZ <[email protected]>
* @category Php Framework, Design pattern builder for PHP.
Expand Down Expand Up @@ -5583,7 +5583,13 @@ public function saveAs($file_path, $filename=null, $download = true){

$file_path = str_replace('..', '', $file_path);

$data = file_get_contents($file_path);
if($this->remoteFileSize($file_path) === false){
$data = $this->get_contents('', '', $file_path);
$data = ($data != $file_path) ? $data : file_get_contents($file_path);
} else {
$data = $file_path;
}

$mime_type = ($this->is_json($data)) ? 'application/json' : $this->mime_content_type($file_path);
$new_filename = (is_null($filename)) ? basename($file_path) : $filename;

Expand Down

0 comments on commit 7c0ee06

Please sign in to comment.