Merge pull request #9899 from frederic34/patch-20

use strict compare
This commit is contained in:
Laurent Destailleur 2018-10-30 14:23:01 +01:00 committed by GitHub
commit a16e7a84e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018 Frédéric France <frederic.francenetlogic.fr>
*
* 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
@ -654,14 +655,12 @@ class PaiementFourn extends Paiement
}
// For compatibility
if (! $mybool)
{
if ($mybool === false) {
$file = $conf->global->SUPPLIER_PAYMENT_ADDON.".php";
$classname = "mod_supplier_payment_".$conf->global->SUPPLIER_PAYMENT_ADDON;
$classname = preg_replace('/\-.*$/','',$classname);
// Include file with class
foreach ($conf->file->dol_document_root as $dirroot)
{
foreach ($conf->file->dol_document_root as $dirroot) {
$dir = $dirroot."/core/modules/supplier_payment/";
// Load file with numbering class (if found)
@ -671,8 +670,7 @@ class PaiementFourn extends Paiement
}
}
if (! $mybool)
{
if ($mybool === false) {
dol_print_error('',"Failed to include file ".$file);
return '';
}