Fix $mybool |=... which is binary op, not boolean op

# Fix $mybool |=... which is binary op, not boolean op

This fixes PhanTypeInvalidLeftOperandOfBitwiseOp.
Replace $var |= ... with $var = ... || $var .
Add cast before ... when needed (@include does not always return bool).
|= always evaluates expression, there for || $var, not $var ||
This commit is contained in:
MDW
2024-03-21 13:21:06 +01:00
parent e44e29c446
commit 170a929656

View File

@@ -416,7 +416,7 @@ class Commande extends CommonOrder
$dir = dol_buildpath($reldir."core/modules/commande/");
// Load file with numbering class (if found)
$mybool |= @include_once $dir.$file;
$mybool = ((bool) @include_once $dir.$file) || $mybool;
}
if ($mybool === false) {