From a617918256af663989bb66486dda551e58916080 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 10 Jan 2022 15:23:27 -0800 Subject: [PATCH] Avoid PHP warnings. --- e107_admin/plugin.php | 16 ++++++++-------- e107_handlers/e107_class.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php index 29e645fef..3a52e10ce 100755 --- a/e107_admin/plugin.php +++ b/e107_admin/plugin.php @@ -362,7 +362,7 @@ class plugin_ui extends e_admin_ui { $plg->load($path); $name = $plg->getName(); - $url = e_ADMIN."plugin.php?mode=installed&action=upgrade&path=".$path."&e-token=".e_TOKEN; + $url = e_ADMIN."plugin.php?mode=installed&action=upgrade&path=".$path."&e-token=".defset('e_TOKEN'); $text .= "
  • ".$plg->getIcon(32)." @@ -928,7 +928,7 @@ class plugin_ui extends e_admin_ui - $text .= "
    + $text .= " "; @@ -1036,11 +1036,11 @@ class plugin_form_ui extends e_admin_form_ui if(!empty($var['plugin_installflag'])) { - $text .= "" . ADMIN_UNINSTALLPLUGIN_ICON . ""; + $text .= "" . ADMIN_UNINSTALLPLUGIN_ICON . ""; } else { - $text .= "" . ADMIN_INSTALLPLUGIN_ICON . ""; + $text .= "" . ADMIN_INSTALLPLUGIN_ICON . ""; } } @@ -1062,17 +1062,17 @@ class plugin_form_ui extends e_admin_form_ui if($var['plugin_version'] != $var['plugin_version_file'] && $var['plugin_installflag']) { - $text .= "" . ADMIN_UPGRADEPLUGIN_ICON . ""; + $text .= "" . ADMIN_UPGRADEPLUGIN_ICON . ""; } if($var['plugin_installflag']) { - $text .= " " . ADMIN_REPAIRPLUGIN_ICON . ""; + $text .= " " . ADMIN_REPAIRPLUGIN_ICON . ""; } if($var['plugin_installflag'] && is_dir($_path . ".git")) { - $text .= " " . ADMIN_GITSYNC_ICON . ""; + $text .= " " . ADMIN_GITSYNC_ICON . ""; } @@ -1221,7 +1221,7 @@ class plugin_online_ui extends e_admin_ui $upgradable = e107::getPlug()->getUpgradableList(); if(!empty($upgradable[$pluginFolder])) { - $mes->addSuccess("".LAN_UPDATE.""); + $mes->addSuccess("".LAN_UPDATE.""); } echo $mes->render('default', 'success'); diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index fe2a6902c..55f548d6f 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -5221,7 +5221,7 @@ class e107 if(self::isCli()) { - if(!empty($_SERVER['argv']) && empty($_GET)) + if(!empty($_SERVER['argv']) && isset($_SERVER['argv'][1]) && empty($_GET)) { parse_str($_SERVER['argv'][1], $_GET); // convert argv to $_GET for script testing via CLI. }