Allow setting the entryname in Zip::add

Created on 5 February 2024, 7 months ago

API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Archiver%...

Enter a descriptive title (above) relating to Zip.php, then describe the problem you have found:

The filename parameter is missing from the add function, it should be changed like this:

public function add($file_path, $entryname = "") {
if(!empty($entryname)){
$this->zip->addFile($file_path, $entryname);
}else{
$this->zip->addFile($file_path);
}
return $this;
}

Feature request
Status

Active

Version

11.0 🔥

Component
File system 

Last updated 1 day ago

Created by

🇮🇹Italy antonio.cangemi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024