From 5f453f8db07c40673cb94d3d83819ff6fbab4b3b Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Wed, 24 Oct 2018 10:02:37 +0200 Subject: [PATCH] fixed fatal error in eZUserType::objectAttributeContent --- kernel/classes/datatypes/ezuser/ezusertype.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/classes/datatypes/ezuser/ezusertype.php b/kernel/classes/datatypes/ezuser/ezusertype.php index 5f0554dbf0f..4a453421308 100644 --- a/kernel/classes/datatypes/ezuser/ezusertype.php +++ b/kernel/classes/datatypes/ezuser/ezusertype.php @@ -364,6 +364,11 @@ function objectAttributeContent( $contentObjectAttribute ) $user = eZUser::fetch( $userID ); eZDebugSetting::writeDebug( 'kernel-user', $user, 'user' ); + // return if user object wasn't found to avoid a fatal error in eZUserType::updateUserDraft + if ( !( $user instanceof eZUser ) ) { + return null; + } + // Looking for a "draft" and loading it's content $serializedDraft = $contentObjectAttribute->attribute( 'data_text' );