1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Fixed warning messages in "online" plugin.

This commit is contained in:
Lóna Lore 2016-11-03 07:24:41 +01:00
parent ca1fb4fa2c
commit 157a622681

View File

@ -30,6 +30,9 @@ class online_shortcodes extends e_shortcode
public function __construct()
{
// Need to set initial value for $scVars. Otherwise it results warning message.
parent::__construct();
$this->e107 = e107::getInstance();
$this->memberInfo = e107::getConfig('history');
$this->gen = e107::getDateConvert();
@ -136,14 +139,14 @@ class online_shortcodes extends e_shortcode
if($ret == false)
{
$newest_member_sql = $sql->select('user', 'user_id, user_name,user_image', "user_ban='0' ORDER BY user_join DESC LIMIT 1");
$sql->select('user', 'user_id, user_name,user_image', "user_ban='0' ORDER BY user_join DESC LIMIT 1");
$row = $sql->fetch();
//$ret = "<a href='".e_HTTP."user.php?id.".$row['user_id']."'>".$row['user_name']."</a>";
if($parm['type'] == 'avatar')
if(varset($parm['type']) == 'avatar')
{
$this->currentMember = array('oid' => $row['user_id'], 'oname'=> $row['user_name'], 'page' => null, 'pinfo' => null,'oimage' => $row['user_image'] );
$ret = e107::getParser()->parseTemplate($this->newestTemplate, TRUE, $this);
//$ret = e107::getParser()->parseTemplate($this->newestTemplate, TRUE, $this);
}
else