MDL-69477 install: Ensure CFG variables are set before using them
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 14 Aug 2020 15:48:57 +0000 (17:48 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 14 Aug 2020 15:48:57 +0000 (17:48 +0200)
commite45ecaa0cc539cd86fb10ca4ed0e7f1685220644
tree59772efd32d6e281427841237ced9ed99f6aea01
parenta0fc902eb184cd4097c8ab453ddc57964cd2dbd4
MDL-69477 install: Ensure CFG variables are set before using them

On installation (or also phpunit/behat unit) some CFG variables
were being used (on setting validation) before being set.

So this commit just verifies they are set before using them. Note that,
strictly speaking, only one of them ($CFG->searchenginequeryonly)
required the extra check, but I think it's better to apply it to all
them, as a reference and in case validations are run in any other order.
admin/settings/plugins.php