1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-21 05:41:58 +02:00

PHP8 fixes

This commit is contained in:
Cameron
2021-01-06 11:54:51 -08:00
parent 7da26c73b4
commit 96827c6180
3 changed files with 14 additions and 3 deletions

View File

@@ -145,7 +145,7 @@
if ($parms[1] == 'value')
{
$uVal = str_replace(chr(1), '', $udata['user_'.$parms[0]]);
$uVal = isset($parms[0]) && isset($udata['user_'.$parms[0]]) ? str_replace(chr(1), '', $udata['user_'.$parms[0]]) : '';
switch ($ueStruct["user_".$parms[0]]['user_extended_struct_type'])
{
@@ -178,6 +178,13 @@
break;
case EUF_DB_FIELD : // check for db_lookup type
$tmp = explode(',',$ueStruct['user_'.$parms[0]]['user_extended_struct_values']);
if(empty($tmp[1]) || empty($tmp[2]))
{
return null;
}
$sql_ue = new db; // Use our own DB object to avoid conflicts
if($sql_ue->select($tmp[0],"{$tmp[1]}, {$tmp[2]}","{$tmp[1]} = '{$uVal}'"))
{
@@ -202,10 +209,12 @@
default :
$ret_data = $uVal;
}
if($ret_data != '')
if(!empty($ret_data))
{
return $tp->toHTML($ret_data, TRUE, 'no_make_clickable', "class:{$udata['user_class']}");
}
return FALSE;
}
// return TRUE;