#434 PHP 8.4 support

This commit is contained in:
Roland Gruber 2025-05-05 20:38:21 +02:00
parent 4167603f66
commit 48472af4e3
5 changed files with 9 additions and 8 deletions

View file

@ -1,4 +1,5 @@
June 2025 9.2
- PHP 8.4 compatibility
- TAK support added
- Active Directory: allow to restore deleted entries in tree view (415)
- Multi-edit tool: change operations are combined by DN to allow e.g. adding object classes with required attributes (408)

View file

@ -2914,7 +2914,7 @@ class LAMCfgMain {
const ERROR_REPORTING_DEFAULT = 'default';
/** PHP error reporting setting from php.ini */
const ERROR_REPORTING_SYSTEM = 'system';
/** PHP error reporting setting as E_ALL | E_STRICT */
/** PHP error reporting setting as E_ALL */
const ERROR_REPORTING_ALL = 'all';
/** send license warnings via email */

View file

@ -763,14 +763,14 @@ class accountContainer {
*/
function __construct($type, $base) {
if (!($type instanceof ConfiguredType)) {
trigger_error('Argument of accountContainer must be ConfiguredType.', E_USER_ERROR);
die('Argument of accountContainer must be ConfiguredType.');
}
if (!is_string($base)) {
trigger_error('Argument of accountContainer must be string.', E_USER_ERROR);
die('Argument base of accountContainer must be string: ' . $base);
}
$this->type = $type;
$this->base = $base;
// Set startpage
// Set start page
$this->current_page = 0;
$this->subpage = 'attributes';
$this->isNewAccount = false;

View file

@ -3,7 +3,7 @@
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2009 - 2012 Pavel Pozdnyak
2009 - 2024 Roland Gruber
2009 - 2025 Roland Gruber
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -1062,7 +1062,7 @@ class asteriskAccount extends baseModule implements passwordService {
'username', $this->messages['AstAccountType'][2], $messages);
//add password
if ($rawAccounts[$i][$ids['asteriskAccount_AstAccountRealmedPassword']] != "") {
$attributes = ['AstAccountCallerID' => [$partialAccounts[$i]['AstAccountCallerID']]]; // fake attribute list for password building
$attributes = ['AstAccountCallerID' => $partialAccounts[$i]['AstAccountCallerID']]; // fake attribute list for password building
$pwdString = asteriskAccount::buildPasswordString($attributes, $this->moduleSettings, $rawAccounts[$i][$ids['asteriskAccount_AstAccountRealmedPassword']]);
$partialAccounts[$i]['AstAccountRealmedPassword'] = $pwdString;
}

View file

@ -137,13 +137,13 @@ if ($_FILES['inputfile'] && ($_FILES['inputfile']['size'] > 0)) {
logNewMessage(LOG_DEBUG, 'Reading CSV file');
$handle = fopen($_FILES['inputfile']['tmp_name'], "r");
if ($handle !== false) {
$head = fgetcsv($handle, 2000);
$head = fgetcsv($handle, 2000, escape: '');
if ($head !== false ) { // head row
foreach ($head as $i => $headItem) {
$ids[$headItem] = $i;
}
}
while (($line = fgetcsv($handle, 2000)) !== false ) { // account rows
while (($line = fgetcsv($handle, 2000, escape: '')) !== false ) { // account rows
$data[] = $line;
}
fclose($handle);