Merge pull request #21147 from bb2a/FIX---php-V8-warning-actions-addupdatedelete

FIX - php V8 warning actions addupdatedelete
This commit is contained in:
Laurent Destailleur 2022-06-08 15:04:42 +02:00 committed by GitHub
commit 8dc908a16a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,11 @@
// $noback may be defined
// $triggermodname may be defined
$hidedetails = isset($hidedetails) ? $hidedetails : '';
$hidedesc = isset($hidedesc) ? $hidedesc : '';
$hideref = isset($hideref) ? $hideref : '';
if (!empty($permissionedit) && empty($permissiontoadd)) {
$permissiontoadd = $permissionedit; // For backward compatibility
}
@ -381,10 +386,10 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $permissiontoadd) {
if (method_exists($object, 'generateDocument')) {
$outputlangs = $langs;
$newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) {
if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) {
$newlang = $object->thirdparty->default_lang;
}
if (!empty($newlang)) {