Skip to content

Commit

Permalink
MDL-83474 webservice: fix empty/zero $itemid handling in text format.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Dec 17, 2024
1 parent aa55f38 commit 0fbf1a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/external/classes/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,8 @@ public static function format_text(
return ['', $textformat ?? FORMAT_MOODLE];
}

if (empty($itemid)) {
$itemid = null;
if ($itemid !== null) {
$itemid = (int) $itemid;
}

// Get settings (singleton).
Expand Down

0 comments on commit 0fbf1a3

Please sign in to comment.