diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 507cf9cdc414c..c612d5367f8c4 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -4401,6 +4401,11 @@ function migrate_productlot_path() { global $conf, $db, $langs, $user; + if (!is_object($user)) { + include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; + $user = new User($db); // To avoid error during migration + } + print '