From 4cac66ba178232fc02eb0aac74fbed94ae0a2e82 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 21 Mar 2024 13:21:24 +0100 Subject: [PATCH] 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 || --- .../eventorganization/class/conferenceorboothattendee.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index f6e4bff74cd..f30196c2ef3 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -969,7 +969,7 @@ class ConferenceOrBoothAttendee extends CommonObject $dir = dol_buildpath($reldir."core/modules/eventorganization/"); // Load file with numbering class (if found) - $mybool |= @include_once $dir.$file; + $mybool = ((bool) @include_once $dir.$file) || $mybool; } if ($mybool === false) {