Skip to content

Commit

Permalink
fixed fatal error in eZUserType::objectAttributeContent
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Oct 24, 2018
1 parent 91205c0 commit 5f453f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kernel/classes/datatypes/ezuser/ezusertype.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );

Expand Down

0 comments on commit 5f453f8

Please sign in to comment.