1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 04:32:01 +02:00

Type and null checks for pluginsTest

This commit is contained in:
Nick Liu 2020-01-18 11:19:03 +01:00
parent fc6b81fdd4
commit b8d6b9eccb
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

View File

@ -63,7 +63,7 @@
$linksTable = e107::getDb()->retrieve('links','*', "link_owner='".$pluginDir."' ", true);
$debug_text .= print_r($linksTable, true);
$files_in_plugin_directory = scandir(e_PLUGIN.$pluginDir);
$files_in_plugin_directory = @scandir(e_PLUGIN.$pluginDir) ?: [];
$corePref = e107::getConfig('core',true,true)->getPref();
@ -312,7 +312,7 @@
$result = $plg->getAddonErrors($this_addon);
if(is_numeric($result))
if(is_numeric($result) && $result != 0)
{
$errMsg = " (".$errors[$result].")";
}