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

Fix null and undefined issues in user_shortcodes.php

This commit is contained in:
Nick Liu 2020-11-28 18:06:51 +01:00
parent 645e162253
commit 05dbdb8625
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

View File

@ -21,6 +21,8 @@ class user_shortcodes extends e_shortcode
function __construct()
{
parent::__construct();
$pref = e107::getPref();
$this->commentsDisabled = vartrue($pref['comments_disabled']);
@ -797,7 +799,7 @@ class user_shortcodes extends e_shortcode
$extended_record = str_replace("EXTENDED_VALUE","USER_EXTENDED={$key}.value.{$this->var['user_id']}", $extended_record);
$extended_record = str_replace('{EXTENDED_ID}',$frm->name2id('user_'.$key), $extended_record);
if(HIDE_EMPTY_FIELDS === TRUE)
if(defined('HIDE_EMPTY_FIELDS') && HIDE_EMPTY_FIELDS === TRUE)
{
$this_value = $tp->parseTemplate("{USER_EXTENDED={$key}.value.{$this->var['user_id']}}", TRUE);