Merge pull request #9902 from frederic34/patch-24

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

View File

@ -4,6 +4,7 @@
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@zendsi.com> * Copyright (C) 2015 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (c) 2018 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -1512,7 +1513,7 @@ class ExpenseReport extends CommonObject
$classname = $conf->global->EXPENSEREPORT_ADDON; $classname = $conf->global->EXPENSEREPORT_ADDON;
// Include file with class // Include file with class
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); $dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']);
foreach ($dirmodels as $reldir) foreach ($dirmodels as $reldir)
{ {
$dir = dol_buildpath($reldir."core/modules/expensereport/"); $dir = dol_buildpath($reldir."core/modules/expensereport/");
@ -1521,9 +1522,8 @@ class ExpenseReport extends CommonObject
$mybool|=@include_once $dir.$file; $mybool|=@include_once $dir.$file;
} }
if (! $mybool) if ($mybool === false) {
{ dol_print_error('', "Failed to include file ".$file);
dol_print_error('',"Failed to include file ".$file);
return ''; return '';
} }