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