open-lms-open-source / moodle-theme_snap

GNU General Public License v3.0
79 stars 78 forks source link

v4.1.3 "str_contains" function issue with PHP versions under 8.0 #277

Open lrskinner opened 7 months ago

lrskinner commented 7 months ago

Hi Team,

An error is occurring with the "str_contains" function (classes/output/core_renderer.php line 166) in one of our Moodle sites running on PHP 7.4 with the latest snap theme version 4.1.3.

Snap v4.1.3 is for Moodle 4.1 and that version of Moodle requires minimum PHP 7.4.0.

The "str_contains" function wasn't introduced until PHP 8.0 so this function should be breaking sites on anything under PHP 8.0 using the latest snap version.

Screenshot of the browser error: snap_issue

Thanks