Skip to content

Commit

Permalink
Merge pull request #72 from integral-learning/66-deprecated-strpos-wa…
Browse files Browse the repository at this point in the history
…rning-on-activity-page

Add null check before calling strpos
  • Loading branch information
Lyannic authored Feb 7, 2024
2 parents ee8e4eb + 5476eb3 commit d398c4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/mumie_participants.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@ function ($searchparam) {
}

/**
* Check if a given string contains an property the participants list cannot be sorted by.
* Check if a given string contains a property the participants list cannot be sorted by.
*
* @param string $searchparam the search term we are checking
* @return bool
*/
private function is_unsortable_column_header($searchparam) {
return strpos($searchparam, 'duedate') !== false || strpos($searchparam, 'submissions') !== false;
return $searchparam === null || strpos($searchparam, 'duedate') !== false || strpos($searchparam, 'submissions') !== false;
}
}

0 comments on commit d398c4d

Please sign in to comment.