dolibarr/htdocs/product/stats
GregcodeOhm 7c5ef541a6
FIX #38981 product/stats/facture.php fatal error when invoice module is disabled (#39049)
The massaction sendEmail feature added to this page for v24 by 8f0b7e3f
(#37937) reads $conf->invoice->dir_output and includes
core/actions_massactions.inc.php on every page load. When the invoice
module is disabled, dir_output is empty, so the include hits its
protection ('$objectclass or $uploaddir was not defined') and exits.
The referers tab built by product_prepare_head() links to this page
unconditionally, so any v24 install without the invoice module gets a
fatal error on the product referers tab. In 23.0 the page had no mass
action code and rendered fine without the module.

Make the whole massaction machinery conditional on isModEnabled('invoice'):
do not read dir_output, do not propose the mass action, neutralize
$massaction and skip the actions_massactions include when the module is
off. This restores the 23.0 behavior for installs without the invoice
module and changes nothing when the module is enabled.

Signed-off-by: GregcodeOhm <greg.aliot@gmail.com>
Co-authored-by: GregcodeOhm <greg.aliot@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 00:27:55 +02:00
..
bom.php Look and feel v24 2026-04-21 13:24:51 +02:00
commande.php Look and feel v24 2026-04-21 13:24:51 +02:00
commande_fournisseur.php Look and feel v24 2026-04-21 13:24:51 +02:00
contrat.php clean code (#37955) 2026-04-21 14:54:15 +02:00
expedition.php Look and feel v24 2026-04-21 13:24:51 +02:00
facture.php FIX #38981 product/stats/facture.php fatal error when invoice module is disabled (#39049) 2026-07-07 00:27:55 +02:00
facture_fournisseur.php Look and feel v24 2026-04-21 13:24:51 +02:00
facturerec.php Look and feel v24 2026-04-21 13:24:51 +02:00
index.php Fix CI: Fix PHPStan notices (#38406) 2026-05-23 04:09:17 +02:00
mo.php Look and feel v24 2026-04-21 13:24:51 +02:00
popuprop.php Add stats page on list 2026-05-19 20:07:11 +02:00
propal.php Look and feel v24 2026-04-21 13:24:51 +02:00
reception.php Look and feel v24 2026-04-21 13:24:51 +02:00
supplier_proposal.php Look and feel v24 2026-04-21 13:24:51 +02:00