From 0b55fbc2657352bf8b55d91b7662ccb9008e7684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9?= Date: Fri, 13 Apr 2018 16:30:51 +0200 Subject: [PATCH] NEPT-1916 - Fix PHP warning caused by ec_resp_preprocess_user_profile() --- template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template.php b/template.php index 10a0bb0..1fef6e0 100755 --- a/template.php +++ b/template.php @@ -204,8 +204,8 @@ function ec_resp_preprocess_user_profile(&$variables) { } $date = ''; - if ($user = user_load(arg(1))) { - $date_string = format_date($user->created, 'custom', 'd/m/Y'); + if (!empty($variables['user'])) { + $date_string = format_date($variables['user']->created, 'custom', 'd/m/Y'); $args = array('@date' => $date_string); $date .= t('Member since @date', $args); }