Closed ak4t0sh closed 5 years ago
https://github.com/ewallah/moodle-availability_relativedate/blob/cfa325b5b4a611a7da4225dd9f6334f1fc330528/classes/condition.php#L158 you should use core_text::strtolower see : https://docs.moodle.org/dev/String_API#strtolower
core_text::strtolower
same for substr: https://github.com/ewallah/moodle-availability_relativedate/blob/cfa325b5b4a611a7da4225dd9f6334f1fc330528/classes/condition.php#L146
substr
fixed
Why should strtolower be used anyway?
EDIT: Why force the string to only contain lower chars?
https://github.com/ewallah/moodle-availability_relativedate/blob/cfa325b5b4a611a7da4225dd9f6334f1fc330528/classes/condition.php#L158 you should use
core_text::strtolower
see : https://docs.moodle.org/dev/String_API#strtolowersame for
substr
: https://github.com/ewallah/moodle-availability_relativedate/blob/cfa325b5b4a611a7da4225dd9f6334f1fc330528/classes/condition.php#L146