Closed susyzan closed 9 months ago
Hi @susyzan ,
I am aware of that issue. It was due to a change with PHP 8.1.
The issue should already be fixed if you try the version of FilterCodes available here on GitHub.
Please let me know if it works better for you. I will be releasing a new version on Moodle.org within the next few weeks.
Best regards,
Michael Milette
Hi @michael-milette,
Thank you for letting me know.
I am probably looking at the wrong branch, but I don't seem to be able to find a fix for this. I created a PR just in case. Please feel free to ignore this if there is a fix already and sorry about the confusion.
Kind regards, Susanna
Hi Susanna,
You are absolutely right. I went through all of my plugins fixing those trims but it looks like I missed that one. Thank you for submitting the PR. It has been integrated here on GitHub and will be included in all future releases of FilterCodes.
Let me know if it gives you any more trouble.
Best regards,
Michael
Hi @michael-milette,
That's great. Thank you so much for maintaining this plugin.
Kind regards, Susanna
You are very welcome Susanna.
Prerequisites
What happened?
I am getting a risky test and the following deprecation notices when running unit tests (PHP 8.1.21, PHPUnit 9.5.27, Moodle 4.1.4):
`PHP Deprecated: trim(): Passing null to parameter # 1 ($string) of type string is deprecated in /var/www/html/filter/filtercodes/tests/filter_test.php on line 143
PHP Deprecated: trim(): Passing null to parameter # 1 ($string) of type string is deprecated in /var/www/html/filter/filtercodes/filter.php on line 1094`
What do you think should have happened?
I expected the unit tests to run successfully
Steps to reproduce
Screenshots
Moodle version
4.1.4
Installed Moodle UI Language packs.
If other language(s), please specify
No response
Workaround
No response
Additional information
No response
System information
PHP 8.1.21 PHPUnit 9.5.27
Code of Conduct