diff --git a/htdocs/core/boxes/box_dolibarr_state_board.php b/htdocs/core/boxes/box_dolibarr_state_board.php index 29dd0716588..a076c096f4c 100644 --- a/htdocs/core/boxes/box_dolibarr_state_board.php +++ b/htdocs/core/boxes/box_dolibarr_state_board.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2015-2021 Frederic France + * Copyright (C) 2015-2024 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -253,7 +253,13 @@ class box_dolibarr_state_board extends ModeleBoxes include_once $includes[$val]; // Loading a class cost around 1Mb $board = new $class($this->db); - $board->load_state_board(); + if (method_exists($board, 'load_state_board')) { + $board->load_state_board(); + } elseif (method_exists($board, 'loadStateBoard')) { + $board->loadStateBoard(); + } else { + $board = -1; + } $boardloaded[$class] = $board; } else { $board = $boardloaded[$classkeyforcache];