Details
Description
During a recent upgrade on my test server on 19stable I came across a PHP Notice: Undefined offset: 1 in /home/arborrow/Moodle/code/19stable/lib/componentlib.class.php on line 480. Looks like we might want to check for empty like we do for 2. Peace - Anthony
p.s. I tagged this as fix for 1.9.8 and trivial since the notice does not cause any failure other than drawing attention to itself when debugging is on.
Patch attached. I pulled this section of code out and ran it in a test page and it stubbornly refused to produce the error. Not sure why. Regardless, here is a patch that adds a guard around that line. I'll commit it after its been reviewed.