Notice: Trying to access array offset on value of type null in Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth->initSdk() (line 58 of modules/contrib/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php).
Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth->initSdk() (Line: 151)
Drupal\social_api\Plugin\NetworkBase->getSdk() (Line: 167)
Drupal\social_auth\Controller\OAuth2ControllerBase->Drupal\social_auth\Controller\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 208)
Drupal\social_auth\Controller\OAuth2ControllerBase->redirectToProvider()
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

localnetwork created an issue. See original summary.

francescogregori’s picture

Priority: Normal » Critical
francescogregori’s picture

Doesn't work with Drupal 9.
The error is:

Notice: Trying to access array offset on value of type null in Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth->initSdk() (line 58 of modules/contrib/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php).
Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth->initSdk() (Line: 58)
dieuwe’s picture

Priority: Critical » Normal
StatusFileSize
new830 bytes

The module does work, but the PHP warning is annoying and it will show on any site without a proxy configured (which is likely a lot of sites). The attached patch should solve the problem by properly checking if the http_client config exists.

dieuwe’s picture

Status: Active » Needs review

  • wells committed 3668e68 on 3.x authored by dieuwe
    Issue #3215559 by dieuwe, localnetwork: Notice: Trying to access array...
wells’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.