Skip to content
Snippets Groups Projects
Commit d23ddb8f authored by Prasad's avatar Prasad
Browse files

Fixed syntax (assigning references) used in dZip and dUnzip for PHP 7 compat.

parent 7d109b56
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,7 @@ class dUnzip2{
// Open file, and set file handler
$fh = fopen($this->fileName, "r");
$this->fh = &$fh;
$this->fh = $fh;
if(!$fh){
$this->debugMsg(2, "Failed to load file.");
return false;
......@@ -198,7 +198,7 @@ class dUnzip2{
$this->getList(false, $compressedFileName);
}
$fdetails = &$this->compressedList[$compressedFileName];
$fdetails = $this->compressedList[$compressedFileName];
if(!isset($this->compressedList[$compressedFileName])){
$this->debugMsg(2, "File '<b>$compressedFileName</b>' is not compressed in the zip.");
return false;
......
......@@ -25,7 +25,7 @@ class dZip{
$this->addFile(false, $dirname, $fileComments);
}
Function addFile($filename, $cfilename, $fileComments='', $data=false){
if(!($fh = &$this->fh))
if(!($fh = $this->fh))
$fh = fopen($this->filename, $this->overwrite?'wb':'a+b');
// $filename can be a local file OR the data wich will be compressed
......@@ -51,7 +51,7 @@ class dZip{
$details['comsize'] = $details['uncsize'];
$details['vneeded'] = 10;
$details['cmethod'] = 0;
$zdata = &$data;
$zdata = $data;
}
else{ // otherwise, compress it
$zdata = gzcompress($data);
......@@ -103,7 +103,7 @@ class dZip{
$this->centraldirs[$filename][$property] = $value;
}
Function save($zipComments=''){
if(!($fh = &$this->fh))
if(!($fh = $this->fh))
$fh = fopen($this->filename, $this->overwrite?'w':'a+');
$cdrec = "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment