Skip to content
Snippets Groups Projects
Commit b02d92e5 authored by Marco Fijn's avatar Marco Fijn Committed by Gabriel Carleton-Barnes
Browse files

Issue #3405913 by strakkie: usort() deprecation on admin overview and PHP...

Issue #3405913 by strakkie: usort() deprecation on admin overview and PHP notice when creating a new snippet
parent 44ada1d6
Branches 2.x
Tags 2.0.3
No related merge requests found
......@@ -58,11 +58,13 @@ class ContentSnippets extends ConfigFormBase {
usort($config, function ($a, $b) {
if ($a['group'] === $b['group']) {
if ($a['weight'] === $b['weight']) {
return $a['id'] > $b['id'];
return 0;
}
else {
return ($a['weight'] > $b['weight']) ? 1 : -1;
}
return $a['weight'] > $b['weight'];
}
return $a['group'] > $b['group'];
return ($a['group'] > $b['group']) ? 1 : -1;
});
foreach ($config as $index => $snippet) {
unset($config[$index]['description']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment