The latest def introduces a notices, that gets triggered when ever a user authenticates.

The issue is, that a default plain standard drupal installation does not have a proxy confiuration in the settings.php.

Attached a patch to fix this issue.

Comments

ayalon created an issue. See original summary.

gvso’s picture

Can you elaborate a little more on how to exactly reproduce this issue?

ayalon’s picture

It's happening on every login. Think of a drupal installation, that does not have $settings['http_client_config')['proxy']['http'] in it's config file. This is default for all new installations.

Which means, that every installation of this module will most probably have this notice everytime a login happens.

gvso’s picture

I have installed a fresh Drupal 8.6 RC1 installation (with all the required Social API modules), and I don't get any errors. Can you please explain step by step how you are getting the error ?

gvso’s picture

Status: Active » Closed (cannot reproduce)
thomwilhelm’s picture

Status: Closed (cannot reproduce) » Active

I've encountered the same issue here, I believe to reproduce you need to add the a line to your settings.php that sets a http_client_config config setting such as:

$settings['http_client_config']['timeout'] = 300;

Then this warning starts getting triggered. You can prevent this warning by then explicitly setting:

$settings['http_client_config']['proxy']['http'] = NULL;

Seems to affect other modules such as the social_auth_google also with the same statement.

gvso’s picture

Ok, I can see why the errors might happen. If we are going to work on this, I think it is also a good idea to check both http and https proxy configuration. Currently, we are only dealing with http proxies.

skymen’s picture

Status: Active » Reviewed & tested by the community
Related issues: +#3154225: Trying to access array offset on value of type null in GoogleAuth.php

Problem is present on fresh installation Drupal 9. This patch fixed it. The same problem on social_auth_google. Yesterday I wrote patch for it https://www.drupal.org/project/social_auth_google/issues/3154225

Ideally, to all social auth plugins should add a same check 'http_client_config' in a code.

daniel kulbe’s picture

That doesn't look right to get the config twice.

wells’s picture

Version: 8.x-2.x-dev » 3.x-dev
Status: Reviewed & tested by the community » Needs review

Retargeting this for 3.x-dev. Don't think a re-roll will be needed.

mohit.bansal623’s picture

StatusFileSize
new747 bytes

Applying patch for the version 3.x-dev.

  • wells committed 403ee14 on 3.x authored by Daniel Kulbe
    Issue #2995064 by ayalon, Daniel Kulbe, mohit.bansal623, gvso,...
wells’s picture

Status: Needs review » Fixed

Thanks, @mohit.bansal623. This is tested and good. Committed to 3.x-dev.

Status: Fixed » Closed (fixed)

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