Merge pull request #32228 from hregis/fix_dev_wrong_entity_param_value

FIX wrong param entity value
This commit is contained in:
Laurent Destailleur 2024-12-04 11:43:40 +01:00 committed by GitHub
commit b41ef2192c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 3 deletions

View file

@ -201,6 +201,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$object->fetch_product();
$manufacturedvalued = '';
if (!empty($object->product)) {
global $mysoc;
$tmparray = $object->product->getSellPrice($mysoc, $mysoc);
$manufacturedvalued = $tmparray['pu_ht'] * $object->qty;
}

View file

@ -53,7 +53,7 @@ function check_user_password_googleoauth($usertotest, $passwordtotest, $entityto
// We save data of form into a variable
$_SESSION['datafromloginform'] = array(
'entity'=>GETPOSTINT('entity'),
'entity'=>GETPOST('entity', 'int'), // avoid to return 0 if entity var not exists
'backtopage'=>GETPOST('backtopage'),
'tz'=>GETPOST('tz'),
'tz_string'=>GETPOST('tz_string'),

View file

@ -334,7 +334,7 @@ if (!GETPOST('code') && !GETPOST('error')) {
dol_syslog("we received the login/email to log to, it is ".$useremail);
$tmparray = (empty($_SESSION['datafromloginform']) ? array() : $_SESSION['datafromloginform']);
$entitytosearchuser = (isset($tmparray['entity']) ? $tmparray['entity'] : -1);
$entitytosearchuser = ((isset($tmparray['entity']) && $tmparray['entity'] != '') ? $tmparray['entity'] : -1);
// Delete the old token
$storage->clearToken($genericstring); // Delete the token called ("Generic-".$storage->keyforprovider)

View file

@ -324,7 +324,7 @@ if (!GETPOST('code')) {
dol_syslog("we received the login/email to log to, it is ".$useremail);
$tmparray = (empty($_SESSION['datafromloginform']) ? array() : $_SESSION['datafromloginform']);
$entitytosearchuser = (isset($tmparray['entity']) ? $tmparray['entity'] : -1);
$entitytosearchuser = ((isset($tmparray['entity']) && $tmparray['entity'] != '') ? $tmparray['entity'] : -1);
// Delete the old token
$storage->clearToken('Google'); // Delete the token called ("Google-".$storage->keyforprovider)