Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deprecated constant (4.5 compatibility) #64

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

Fragonite
Copy link

@Fragonite Fragonite commented Nov 28, 2024

TL;DR

MESSAGE_DEFAULT_LOGGEDIN and MESSAGE_DEFAULT_LOGGEDOFF are deprecated and have been removed in 4.5, preventing the plugin from installing.

These constants have been replaced with MESSAGE_DEFAULT_ENABLED.

Additionally, when running unit tests, this message would appear:

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/workplace/mod/hvp/locallib.php on line 112

A null coalescing operator has been added to fix this.

Links

https://tracker.moodle.org/browse/MDL-67853
https://tracker.moodle.org/browse/MDL-73284
https://github.com/moodle/moodle/blob/505a85eb9ae2db84eff143a282ae79b55205c464/lib/upgrade.txt#L715-L720

@tuanngocnguyen
Copy link

lgtm

@tuanngocnguyen tuanngocnguyen merged commit 89a835e into stable-catalyst-400 Nov 28, 2024
7 of 24 checks passed
@tuanngocnguyen tuanngocnguyen deleted the fix-compatibility-45 branch November 28, 2024 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants