-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.4, 3.5.3
-
Fix Version/s: 3.5.4
-
Component/s: Libraries
-
Testing Instructions:
-
Affected Branches:MOODLE_34_STABLE, MOODLE_35_STABLE
-
Fixed Branches:MOODLE_35_STABLE
-
Pull from Repository:
-
Pull 3.5 Branch:
MDL-61990_35 -
Pull 3.5 Diff URL:
-
Pull Master Branch:
-
Pull Master Diff URL:
As a developer (of the CodeRunner question type) I am finding the following code in lib/outputrequirementslib.php a bit troublesome:
{{ if ($CFG->debugdeveloper) {}}
$toomanyparamslimit = 1024;
if (strlen($strparams) > $toomanyparamslimit) {
debugging('Too many params passed to js_call_amd("' . $fullmodule . '", "' . $func . '")', DEBUG_DEVELOPER);
{{ }}}
{{ }}}
Is there a good reason for this check? The error message itself is confusing as it's not the number of parameters that's the issue, but the lengths of the JSON-encoded parameter list. I am passing an array of selected language strings to my AMD modules and often triggering this error. Since it only affects developers, it's not a major problem and I've simply commented it out but I would like to know if there is a potential problem with passing an array of strings to AMD modules.