Skip to content

Commit f77b741

Browse files
committed
Improvement: Get rid of a deprecation warning on PHP 8.2 and upwards
1 parent 0fef14c commit f77b741

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ moodle-local_profilecohort
44
Changes
55
-------
66

7+
### Unreleased
8+
9+
* 2025-10-31 - Improvement: Get rid of a deprecation warning on PHP 8.2 and upwards, resolves #66
10+
711
### v5.0-r2
812

913
* 2025-10-15 - Make codechecker happy again

classes/field_text.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ protected function __construct($ruledata = null) {
8686
*/
8787
protected function matches_internal($value) {
8888
$value = strtolower(trim(strip_tags($value)));
89-
$matchvalue = strtolower(trim($this->matchvalue));
89+
$matchvalue = strtolower(trim($this->matchvalue ?? ''));
9090
switch ($this->matchtype) {
9191
case self::MATCH_NOTEXACT:
9292
return ($value != $matchvalue);

0 commit comments

Comments
 (0)