Update locallib.php

for array types in 2.x you should use optional_param_array() instead of optional_param()