early release 1.9.14 before people change to php 8.2

This commit is contained in:
oheil 2023-03-15 10:14:19 +01:00
parent 78877dfbb7
commit 475ee3d74e
3 changed files with 12 additions and 10 deletions

View file

@ -11,7 +11,7 @@
*
* @package NOCC
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: common.php 3070 2023-03-11 12:33:25Z oheil $
* @version SVN: $Id: common.php 3075 2023-03-15 09:14:06Z oheil $
*/
define('NOCC_DEBUG_LEVEL', 0);
@ -57,7 +57,7 @@ require_once './utils/crypt.php';
require_once './utils/translation.php';
$conf->nocc_name = 'NOCC';
$conf->nocc_version = '1.9.13';
$conf->nocc_version = '1.9.14';
$conf->nocc_url = 'http://nocc.sourceforge.net/';
$pwd_to_encrypt = false;

View file

@ -1,10 +1,11 @@
Latest version is 1.9.14-dev
Latest version is 1.9.14
NOCC 1.9.14 March??????????????
NOCC 1.9.14 March 15, 2023
Bugs
* Bug #511 : Auto-Update fails with php 8.2.3 (Oliver Heil).
Creating an early release before people switch to php 8.2.
Latest version is 1.9.13

View file

@ -325,14 +325,15 @@ else {
}
}
echo '<p class="new-version-update-info">Compressing archive: '.$archive_name.'.gz</p>';
//the following failes in php 8.2 with Allowed memory size exhausted
//the following fails in php 8.2 with Allowed memory size exhausted
//$archive->compress(Phar::GZ);
//doing it manually:
$gzfile=gzcompressfile($archive_name);
unset($archive);
echo '<p class="new-version-update-info">Removing file: '.$archive_name.'</p>';
Phar::unlinkArchive($archive_name);
$archive_name=gzdecompress($gzfile);
$archive_name=gzdecompressfile($gzfile);
$archive=new PharData($archive_name);
$number_of_files_check=$archive->count();
@ -414,10 +415,10 @@ else {
$archive->close();
}
else {
//the following failes in php 8.2 with Allowed memory size exhausted
//the following fails in php 8.2 with Allowed memory size exhausted
//$archive=new PharData($archive_name);
$tar_archive_name=gzdecompress($archive_name);
//doing it manually:
$tar_archive_name=gzdecompressfile($archive_name);
$archive=new PharData($tar_archive_name);
$archive->extractTo('.');
@ -553,7 +554,7 @@ function gzcompressfile(string $inFilename, int $level = 9): string
return $gzFilename;
}
// https://stackoverflow.com/questions/3293121/how-can-i-unzip-a-gz-file-with-php
function gzdecompress(string $file_name): string
function gzdecompressfile(string $file_name): string
{
// Raising this value may increase performance
$buffer_size = 4096; // read 4kb at a time