mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-07 08:14:42 +03:00
Fix unhandled error in plugins list discovering
This commit is contained in:
parent
9417960281
commit
51ad3e70d3
@ -48,7 +48,12 @@ class Utils
|
|||||||
'/plugins/*/Mibew/Plugin/*/Plugin.php'
|
'/plugins/*/Mibew/Plugin/*/Plugin.php'
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach (glob($pattern) as $plugin_file) {
|
$plugin_files = glob($pattern);
|
||||||
|
if ($plugin_files === FALSE) {
|
||||||
|
// TODO: Maybe one should raise some exception here
|
||||||
|
return $plugins;
|
||||||
|
}
|
||||||
|
foreach ($plugin_files as $plugin_file) {
|
||||||
// Build plugin's name and make sure the plugin exists.
|
// Build plugin's name and make sure the plugin exists.
|
||||||
$parts = array_reverse(explode(DIRECTORY_SEPARATOR, $plugin_file));
|
$parts = array_reverse(explode(DIRECTORY_SEPARATOR, $plugin_file));
|
||||||
$plugin_name = $parts[4] . ':' . $parts[1];
|
$plugin_name = $parts[4] . ':' . $parts[1];
|
||||||
|
Loading…
Reference in New Issue
Block a user