- Issue created by @antonio.cangemi
- Assigned to antonio.cangemi
- Status changed to Active
7 months ago 1:37pm 5 February 2024 - 🇺🇸United States cilefen
If you default the parameter to NULL, is it necessary to have a conditional?
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;
}
Active
11.0 🔥
If you default the parameter to NULL, is it necessary to have a conditional?