Skip to content

Commit

Permalink
[NDB_BVL_Instrument_LINST] - fix (aces#9487)
Browse files Browse the repository at this point in the history
Fix

PHP Fatal error: Uncaught TypeError: substr(): Argument #2 ($offset)
must be of type int, false given in
/var/www/Loris/php/libraries/NDB_BVL_Instrument_LINST.class.inc:172

from the BMI instrument.
  • Loading branch information
kongtiaowang authored Jan 9, 2025
1 parent 85a4be9 commit 7ccabea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion php/libraries/NDB_BVL_Instrument_LINST.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ class NDB_BVL_Instrument_LINST extends \NDB_BVL_Instrument
//If this is an OR rule using two different controllers
//explode it at the pipe.
//ex: q_1{@}=={@}yes|q_2{@}=={@}yes
if (stristr(substr($rule, strpos($rule, "|")), "{@}")) {
$s_r = strpos($rule, "|");
if ($s_r !== false && stristr(substr($rule, $s_r), "{@}")) {
$rules_array = explode("|", $rule);
} else {
//Otherwise its a regular rule. ex: q_1{@}=={@}yes
Expand Down

0 comments on commit 7ccabea

Please sign in to comment.