Skip to content

Commit 550a8ab

Browse files
committed
FIX: extract doc content > test if is_file
1 parent e872991 commit 550a8ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Pragma/Docs/Models/Document.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public function downloadfile($attachment = true) {
274274
protected function extract_text($preserveLinesBreaks = true) {
275275
ini_set('max_execution_time',0);
276276
$content = '';
277-
if (file_exists($this->get_full_path())) {
277+
if (file_exists($this->get_full_path()) && is_file($this->get_full_path())) {
278278
$pathexec = str_replace(" ","\ ",$this->get_full_path());
279279
$extrapath = defined("EXTRA_PATH") ? 'PATH=$PATH:'.EXTRA_PATH : '';
280280
$content = shell_exec(escapeshellcmd($extrapath . ' textract '.escapeshellarg($pathexec).' --preserveLineBreaks '. ($preserveLinesBreaks ? 'true' : 'false')));

0 commit comments

Comments
 (0)