Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Feb 3, 2025
1 parent 1dabc6d commit 729c706
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
12 changes: 0 additions & 12 deletions dev/build/phpstan/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -30024,18 +30024,6 @@ parameters:
count: 7
path: ../../../htdocs/user/card.php

-
message: '#^Variable \$dolibarr_main_authentication might not be defined\.$#'
identifier: variable.undefined
count: 12
path: ../../../htdocs/user/card.php

-
message: '#^Variable \$formproduct might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../../htdocs/user/card.php

-
message: '#^Variable \$mc might not be defined\.$#'
identifier: variable.undefined
Expand Down
11 changes: 7 additions & 4 deletions htdocs/user/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Copyright (C) 2015 Ari Elbaz (elarifr) <[email protected]>
* Copyright (C) 2015-2018 Charlene Benke <[email protected]>
* Copyright (C) 2016 Raphaël Doursenaud <[email protected]>
* Copyright (C) 2018-2024 Frédéric France <[email protected]>
* Copyright (C) 2018-2025 Frédéric France <[email protected]>
* Copyright (C) 2018 David Beniamine <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
Expand Down Expand Up @@ -70,17 +70,19 @@
* @var HookManager $hookmanager
* @var Translate $langs
* @var User $user
*
* @var string $dolibarr_main_authentication
*/

// Load translation files required by page
$langs->loadLangs(array('users', 'companies', 'ldap', 'admin', 'hrm', 'stocks', 'other'));

$id = GETPOSTINT('id');
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'aZ09');
$mode = GETPOST('mode', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$group = GETPOSTINT("group", 3);
$cancel = GETPOST('cancel', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'useracard'; // To manage different context of search

if (empty($id) && $action != 'add' && $action != 'create') {
Expand Down Expand Up @@ -876,6 +878,7 @@
$formcompany = new FormCompany($db);
$formadmin = new FormAdmin($db);
$formfile = new FormFile($db);
$formproduct = null;
if (isModEnabled('stock')) {
$formproduct = new FormProduct($db);
}
Expand Down

0 comments on commit 729c706

Please sign in to comment.