contao / check

Contao Check
GNU Lesser General Public License v3.0
47 stars 23 forks source link

suppress fsockopen errors #107

Closed fritzmg closed 7 years ago

fritzmg commented 8 years ago

This is only a minor issue.

Within the canConnect method, the Check tries to create a connection via

fsockopen('ssl://…', 443, …);

This might generate Warnings when the connection fails, which might be visible in the frontend, depending on the server configuration:

1a1c54a8-a1d4-11e6-9ec5-e6fb98f2cf48

1de05b8e-a1d4-11e6-96f7-2a7b7d3a9f52

Such a warning is generated when the open_ssl extension is missing for example.

This PR simply adds @ to fsockopen.

leofeyer commented 7 years ago

Turns out the fix was not comprehensive enough:

We should check if ($connected) when closing the connection.

fritzmg commented 7 years ago

kk, I will make a PR tomorrow.

leofeyer commented 7 years ago

Thank you.