MDL-52035 core_block: avoid PHP error when there is no region
This occurs when sharing a quiz via the LTI provider when it adds a 'fake block' for quiz navigation. There may be other occurrences.
This commit is contained in:
@@ -271,6 +271,9 @@ class block_manager {
|
||||
* @return boolean true if this region exists on this page.
|
||||
*/
|
||||
public function is_known_region($region) {
|
||||
if (empty($region)) {
|
||||
return false;
|
||||
}
|
||||
return array_key_exists($region, $this->regions);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user