Skip to content
Snippets Groups Projects
Commit 597b31d5 authored by chetan's avatar chetan Committed by Aaron Bauman
Browse files

Issue #3415336 by chetan 11, yivanov: Passing null to parameter #1 ($string)...

Issue #3415336 by chetan 11, yivanov: Passing null to parameter #1 ($string) of type string is deprecated
parent bddb3828
No related branches found
No related tags found
No related merge requests found
Pipeline #85583 canceled
......@@ -17,16 +17,16 @@ class SalesforceAuthListBuilder extends ConfigEntityListBuilder {
public function buildRow(EntityInterface $entity) {
/** @var \Drupal\salesforce\SalesforceAuthProviderInterface $plugin */
$plugin = $entity->getPlugin();
$row['default'] = $entity->authManager()
->getConfig() && $entity->authManager()
->getConfig()
->id() == $entity->id()
? $this->t('Default') : '';
$row['default'] = $entity->authManager()->getConfig()?->id == $entity->id()
? $this->t('Default')
: '';
$row['label'] = $entity->label();
$row['url'] = $plugin->getCredentials()->getLoginUrl();
$row['key'] = substr($plugin->getCredentials()->getConsumerKey(), 0, 16) . '...';
$row['type'] = $plugin->label();
$row['status'] = $plugin->hasAccessToken() ? 'Authorized' : 'Missing';
$row['url'] = $plugin?->getCredentials()?->getLoginUrl();
$row['key'] = $plugin?->getCredentials()?->getConsumerKey()
? substr($plugin?->getCredentials()?->getConsumerKey(), 0, 16) . '...'
: NULL;
$row['type'] = $plugin?->label();
$row['status'] = $plugin?->hasAccessToken() ? 'Authorized' : 'Missing';
return $row + parent::buildRow($entity);
}
......@@ -40,7 +40,7 @@ class SalesforceAuthListBuilder extends ConfigEntityListBuilder {
// Add a "revoke" action if we have a token.
$operations['edit']['url'] = $entity->toUrl('edit-form');
if (!$entity instanceof SalesforceAuthConfig
|| !$entity->getPlugin()->hasAccessToken()
|| !$entity->getPlugin()?->hasAccessToken()
|| !$entity->hasLinkTemplate('revoke')) {
return $operations;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment