Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
fix(path issue): fixed a php warning when building the download path
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiSchwarz-cnic committed Aug 11, 2021
1 parent 0fbb587 commit fea4dca
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function downloadPendingDeleteList()
die("Cannot find tmp directory!");
}
$path = $GLOBALS["downloads_dir"];
if (!preg_match("/" . preg_quote(DIRECTORY_SEPARATOR) . "$/", $path)) { // installation not secured
if (substr($path, -1) !== DIRECTORY_SEPARATOR) { // installation not secured
$path .= DIRECTORY_SEPARATOR;
}
$download = $path . "pending_delete_list_tmp.zip";
Expand Down Expand Up @@ -159,7 +159,7 @@ public function import()

$this->downloadPendingDeleteList();
$path = $GLOBALS["downloads_dir"];
if (!preg_match("/" . preg_quote(DIRECTORY_SEPARATOR) . "$/", $path)) { // installation not secured
if (substr($path, -1) !== DIRECTORY_SEPARATOR) { // installation not secured
$path .= DIRECTORY_SEPARATOR;
}

Expand Down

0 comments on commit fea4dca

Please sign in to comment.