Fix sorting of Pico::$nativePlugins

Thanks to PT on our Freenode IRC channel #picocms for reporting this!
This commit is contained in:
Daniel Rudolf 2018-03-29 22:45:12 +02:00
parent 05c2c968c3
commit 190889b77b
No known key found for this signature in database
GPG key ID: A061F02CD8DE4538

View file

@ -770,12 +770,14 @@ class Pico
$plugins = $this->plugins;
$nativePlugins = $this->nativePlugins;
$sortedPlugins = array();
$sortedNativePlugins = array();
$visitedPlugins = array();
$visitPlugin = function ($plugin) use (
$plugins,
$nativePlugins,
&$sortedPlugins,
&$sortedNativePlugins,
&$visitedPlugins,
&$visitPlugin
) {
@ -802,6 +804,9 @@ class Pico
}
$sortedPlugins[$pluginName] = $plugin;
if (isset($nativePlugins[$pluginName])) {
$sortedNativePlugins[$pluginName] = $plugin;
}
}
};
@ -814,6 +819,7 @@ class Pico
}
$this->plugins = $sortedPlugins;
$this->nativePlugins = $sortedNativePlugins;
}
/**