Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.11.8, 4.0.2
-
None
-
MOODLE_311_STABLE, MOODLE_400_STABLE
Description
I have seen that h5p is occasionally generating warnings in our logs:
E_WARNING: array_search() expects parameter 2 to be array, bool given
|
in array_search called at /var/www/html/h5p/classes/api.php (320)
|
in core_h5p\api::create_content_from_pluginfile_url called at /var/www/html/h5p/classes/player.php (130)
|
in core_h5p\player::__construct called at /var/www/html/contentbank/contenttype/h5p/classes/content.php (52)
|
in contenttype_h5p\content::is_view_allowed called at /var/www/html/contentbank/classes/contentbank.php (219)
|
in core_contentbank\contentbank::search_contents called at /var/www/html/contentbank/index.php (65)
|
it appears to be happening because the code does not take into account that the helper can set the info property to false if there are no messages
It looks as though the same issue is currently present in master