fixed deprecated functions that were breaking revisions.

This commit is contained in:
2022-04-03 13:39:01 +01:00
parent 65fe65474e
commit 49ab81ca23
2 changed files with 10 additions and 8 deletions

View File

@ -59,7 +59,7 @@ class OCActorForm extends ContentEntityForm {
]));
}
// If you have unpublished the entity and you can't see unpublished entities, redirect to a more informative message than just "Access Denied".
if (!$form_state->getValue('status')['value'] && !\Drupal::currentUser()->hasPermission('view unpublished actor entities')) {
if (is_array($form_state->getValue('status')) && $form_state->getValue('status')['value'] == false && !\Drupal::currentUser()->hasPermission('view unpublished actor entities')) {
\Drupal::messenger()->addMessage($this->t('The record for "%label" is now unpublished & hidden from you.', [
'%label' => $entity->label(),
]));