From 8029b80f08d00f593325359d274201a67d565c9e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Sep 2020 13:03:34 +0200 Subject: [PATCH] Fix install hangs --- htdocs/core/modules/modProduct.class.php | 3 ++- htdocs/core/modules/modService.class.php | 3 ++- htdocs/install/upgrade2.php | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index c8217ee3c43..5237f5f9b4b 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -167,7 +167,8 @@ class modProduct extends DolibarrModules $r++; */ - $usenpr = $mysoc->useNPR(); + $usenpr = 0; + if (is_object($mysoc)) $usenpr = $mysoc->useNPR(); // Exports //-------- diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 8173db53a9a..258af06389a 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -134,7 +134,8 @@ class modService extends DolibarrModules $r++; */ - $usenpr = $mysoc->useNPR(); + $usenpr = 0; + if (is_object($mysoc)) $usenpr = $mysoc->useNPR(); // Exports //-------- diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 13e50732566..90ac30058e0 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -1,6 +1,4 @@ * Copyright (C) 2005-2018 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin