Affects Version/s: 3.4.7, 3.5.4, 3.6, 3.7
Fix Version/s: None
Affected Branches:MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
If you visit the admin/settings.php?section=mobilesettings page on a moodle site 3.4 or greater that has a valid certificate, moodle will perform a check in admin/tool/mobile/classes/api.php
But you will get a php error notice that the $cert['Signature Algorithm'] index is undefined.
That's because the curl does not parse the returned json data correctly. What we see is
in the certinfo section of the returned curl data. What we should see is 'Signature Algorithm' having its own element in the associative array, not be part of this string.
To reproduce this error:
- Turn on debug display and developer in a moodle site 3.4 or greater.
- If on a development site, in the code you can change the line in admin/tool/mobile/classes/api.php
to a site with a valid certificate, eg.
3. Load the admin/settings.php?section=mobilesettings page and observe the php notices. Happens in php 5.6, 7.0, 7.2.
This is not a problem directly in moodle, rather in the way php has implemented curl. But it will produce errors in moodle sites on this page.
It will be up to php to fix properly, but until then we might want to have a temporary fix in place, or at least be aware of it. I've also made a php bug report: https://bugs.php.net/bug.php?id=77548