From 5978773d81838bc46a2e209dccebd138a024c9eb Mon Sep 17 00:00:00 2001 From: Neill Magill Date: Wed, 16 Sep 2015 16:18:21 +0100 Subject: [PATCH] MDL-51435 Web Services: E_WARNING in core_webservice_get_site_info $plugin was not being set before the version file was included. This caused an E_WARNING: Creating default object from empty value This change creates the plugin object before the version file sets its parameters. --- webservice/externallib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/webservice/externallib.php b/webservice/externallib.php index ea7d8bcc0b5..e1d0bc83573 100644 --- a/webservice/externallib.php +++ b/webservice/externallib.php @@ -142,6 +142,7 @@ class core_webservice_external extends external_api { if (is_readable($versionpath)) { // We store the component version once retrieved (so we don't load twice the version.php). if (!isset($componentversions[$function->component])) { + $plugin = new stdClass(); include($versionpath); $componentversions[$function->component] = $plugin->version; $version = $plugin->version;