MDL-48493 admin: Fix PHP warning thrown if unable to detect component
authorDavid Mudrák <david@moodle.com>
Thu, 22 Jan 2015 09:02:01 +0000 (10:02 +0100)
committerDavid Mudrák <david@moodle.com>
Thu, 22 Jan 2015 09:02:01 +0000 (10:02 +0100)
commitef86599e9903ac51ca750dfc2108a610f9eead75
tree127fa0e1b2647e5ca7e6ea49349c6e34bf598e5c
parentedb13e3c2d6be644d837587a748cb654207939ba
MDL-48493 admin: Fix PHP warning thrown if unable to detect component

The method detect_plugin_component() returns false or string. The
normalize_component() expects strings only. Passing false to it
(typically when the plugin does not declare its component) caused the
PHP warning.

Credit goes to Ankit Agarwal for spotting this during testing.
admin/tool/installaddon/index.php