Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING: /var/www/matomo/core/Http.php(538): Notice - Trying to access array offset on value of type null - Matomo 3.13.4 #15850

Closed
Tim197 opened this issue Apr 23, 2020 · 5 comments · Fixed by #16846
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Milestone

Comments

@Tim197
Copy link

Tim197 commented Apr 23, 2020

Since I updated to 3.13.2 I get the following message when I open the Administration tab:

WARNING: /var/www/matomo/core/Http.php(538): Notice - Trying to access array offset on value of type null - Matomo 3.13.4 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: Installation, Action: systemCheckPage, In CLI mode: false)

I am currently running at 3.13.4.
Also, my crontab for archiving doesn't work. I set it up as described in the documentation: https://matomo.org/docs/setup-auto-archiving/
Could that be linked to the warning message?

I appreciate your help. Thanks in advance!

@Findus23 Findus23 added the Bug For errors / faults / flaws / inconsistencies etc. label Apr 23, 2020
@tsteur tsteur added the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label Apr 23, 2020
@tsteur
Copy link
Member

tsteur commented Apr 23, 2020

Thanks for reporting this @Tim197 Very appreciated. Seems you're not getting a response from an HTTP request, and at the same time PHP doesn't give us an error which seems rather unusual. I supposed we'd need to trigger a generic error message there instead when this happens. There is definitely a bug in there.

The code hasn't been changed there in many years though. It might indicate something changed on your server or environment, or on the server the script is trying to reach.

@dercheffe
Copy link

dercheffe commented Oct 7, 2020

Hello I get this similar error
MYSERVERPATH/matomo/core/Http.php(538): Notice - Trying to access array offset on value of type null - Matomo 3.14.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: Installation, Action: getSystemCheck, In CLI mode: false)
since my Lets encrypt ssl certificate expired. My hoster tries to renew it. Hopefully it will work again. Perhaps this information helps for the bug research.

@mustard123
Copy link

mustard123 commented Nov 4, 2020

@Tim197 I solved the problem by installing php-curl

sudo apt-get install php-curl
sudo systemctl restart apache2.service

This fixes the problem for me
Credit: https://forum.matomo.org/t/autoupdate-error-in-core-http-php-538/38084

@Findus23
Copy link
Member

Findus23 commented Nov 30, 2020

The same issue was reported in https://forum.matomo.org/t/warning-message-on-new-installation/39557

For whatever reason, when Matomo tries to make a HTTP request (e.g. to fetch data from the marketplace), it gets back an empty response.
Matomo then tries to display an error message with the last error that occured, but there is no error (which causes the warning you see).

You can try to install php-curl as then Matomo uses that instead of the fopen-based method and it circumvents this issue. Or you could try to find out why your server can’t do HTTP requests in PHP.

@peterbo
Copy link
Contributor

peterbo commented Dec 1, 2020

In PHP7x, error_get_last() doesn't work, when we override the error handler manually (set_error_handler), that catches the error/behaves differently. Probably a generic message would be best!

@sgiehl sgiehl added this to the 4.1.0 milestone Dec 1, 2020
@sgiehl sgiehl self-assigned this Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants