1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 05:37:32 +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

View File

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