Skip to content

Commit

Permalink
Bug-fix.
Browse files Browse the repository at this point in the history
Changelog excerpt:
- Typo in the code for handling "then" statements in the operation
  handler's ifCompare method; Fixed.
  • Loading branch information
Maikuolan committed Aug 16, 2023
1 parent 1d20147 commit 42bec5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ found at:

- [2023.05.13; Maikuolan]: Fixed a link.

- [2023.08.16; Bug-fix; Maikuolan]: Typo in the code for handling "then"
statements in the operation handler's ifCompare method; Fixed.

=== Version/Release 2.9.6 ===
PATCH RELEASE.

Expand Down
6 changes: 3 additions & 3 deletions src/Operation.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Operation handler (last modified: 2023.03.24).
* Operation handler (last modified: 2023.08.16).
*
* This file is a part of the "common classes package", utilised by a number of
* packages and projects, including CIDRAM and phpMussel.
Expand Down Expand Up @@ -279,15 +279,15 @@ public function ifCompare(&$Data, string $IfString): string
$IfString = substr($IfString, 0, $ThenPos);
if (substr($ThenString, 0, 1) === '{') {
if (substr($ThenString, -1) === '}') {
$ThenString = substr($ThenString, 1 -1);
$ThenString = substr($ThenString, 1, -1);
} elseif (substr($ElseString, 0, 1) !== '{' && substr($ElseString, -1) === '}') {
$ThenString = substr($ThenString, 1) . ' else' . substr($ElseString, 0, -1);
$ElseString = '';
}
}
}
if (substr($ElseString, 0, 1) === '{' && substr($ElseString, -1) === '}') {
$ElseString = substr($ElseString, 1 -1);
$ElseString = substr($ElseString, 1, -1);
}

/** Process condition. */
Expand Down

0 comments on commit 42bec5b

Please sign in to comment.