Call to undefined function str contains()

这个问题怎么解决(如图)?请求帮助!

How to solve this problem (as shown in the picture)? Please help!

BV52's picture

Hi,

In order to give your bug report the best chance of getting answered, please include the following information:

  1. Detailed steps to reproduce the bug (exactly how and when did it happen)
  2. Platform and version number. E.g. Drupal, Wordpress, Moodle.
  3. Mobile or Desktop
  4. Browser: Chrome, Firefox, Safari etc
  5. H5P plugin version
  6. H5P content type and version (if a content type was used), and a sample URL or attached H5P.
  7. Any browser console errors
  8. Any PHP errors
  9. Screenshots if it's a visual problem
  10. Any recent changes to the environment (new plugins/modules, updates, configuration changes etc.)
  11. Any recent changes to the browser you're using (new extensions, updates etc.)

The more information you provide, the quicker the community will be able to fix it and the quicker you'll have a working solution!

-BV

otacke's picture

That is a known issue.

H5P core expects PHP 8 which is reasonable, because PHP 7 reached its end of life years ago.

The server seems to still be running PHP 7 which does not contain a `str_contains` function.

The reasonable solution here would be to update PHP to version 8 on the server - not only for the sake of running H5P.