Fix undefined array keys when displaying revisions
This commit is contained in:
parent
7c3926398e
commit
3fef852d67
|
@ -107,7 +107,7 @@ class InputElement extends Element
|
|||
$name = array_keys($parsed);
|
||||
$name = array_shift($name);
|
||||
|
||||
if (is_array($parsed[$name])) {
|
||||
if (isset($parsed[$name]) && is_array($parsed[$name])) {
|
||||
$key = array_keys($parsed[$name]);
|
||||
$key = array_shift($key);
|
||||
} else {
|
||||
|
|
|
@ -237,15 +237,22 @@ class Revisions extends Ui
|
|||
'current' => true,
|
||||
);
|
||||
} else {
|
||||
if (isset($INFO['meta']['last_change'])) {
|
||||
$type = $INFO['meta']['last_change']['type'];
|
||||
$sizechange = $INFO['meta']['last_change']['sizechange'];
|
||||
} else {
|
||||
$type = $sizechange = null;
|
||||
}
|
||||
|
||||
$revisions[] = array(
|
||||
'date' => $INFO['lastmod'],
|
||||
'ip' => null,
|
||||
'type' => $INFO['meta']['last_change']['type'],
|
||||
'type' => $type,
|
||||
'id' => $INFO['id'],
|
||||
'user' => $INFO['editor'],
|
||||
'sum' => $INFO['sum'],
|
||||
'extra' => null,
|
||||
'sizechange' => $INFO['meta']['last_change']['sizechange'],
|
||||
'sizechange' => $sizechange,
|
||||
'current' => true,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue