Merge branch 'MDL-51969-master' of https://github.com/dmitriim/moodle

This commit is contained in:
David Monllao 2018-10-09 09:19:53 +02:00
commit b52e22dccb

View file

@ -304,7 +304,7 @@ abstract class resource_base {
if (empty($this->params)) {
$this->params = array();
if (isset($_SERVER['PATH_INFO'])) {
if (isset($_SERVER['PATH_INFO']) && !empty($_SERVER['PATH_INFO'])) {
$path = explode('/', $_SERVER['PATH_INFO']);
$parts = explode('/', $this->get_template());
for ($i = 0; $i < count($parts); $i++) {