Skip to content

Commit

Permalink
IOMAD: IOMAD link block throws error is no company id returned
Browse files Browse the repository at this point in the history
  • Loading branch information
turf212 committed May 29, 2024
1 parent 535a72c commit b67647c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blocks/iomad_link/block_iomad_link.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function get_content() {
// Only display if you have the correct capability.
$systemcontext = \context_system::instance();
$companyid = iomad::get_my_companyid($systemcontext, false);
if (!empty($companyid)) {
if (!empty($companyid) && $companyid > 0) {
$companycontext = \core\context\company::instance($companyid);
} else {
$companycontext = $systemcontext;
Expand Down

0 comments on commit b67647c

Please sign in to comment.