MDL-78386 search: specify correct parameter type for search area.

This commit is contained in:
Paul Holden 2023-06-14 13:37:49 +01:00
parent e998f14061
commit f68e0b9d00
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164

View File

@ -32,7 +32,7 @@ require_once($CFG->libdir . '/adminlib.php');
admin_externalpage_setup('searchareas', '', null, (new moodle_url('/admin/searchreindex.php'))->out(false));
// Get area parameter and check it exists.
$areaid = required_param('areaid', PARAM_ALPHAEXT);
$areaid = required_param('areaid', PARAM_ALPHANUMEXT);
$area = \core_search\manager::get_search_area($areaid);
if ($area === false) {
throw new moodle_exception('invalidrequest');