MDL-41451 - formslib: use create_function instead of inline function
As per MDL-39432, closure-style inline functions can result in fatal errors when using eAccelerator and thus should be avoided.
This commit is contained in:
+2
-3
@@ -302,9 +302,8 @@ abstract class moodleform {
|
||||
$str = file_get_contents("php://input");
|
||||
$delim = '&';
|
||||
|
||||
$chunks = array_map(function($p) use ($delim) {
|
||||
return implode($delim, $p);
|
||||
}, array_chunk(explode($delim, $str), $max));
|
||||
$fun = create_function('$p', 'return implode("'.$delim.'", $p);');
|
||||
$chunks = array_map($fun, array_chunk(explode($delim, $str), $max));
|
||||
|
||||
foreach ($chunks as $chunk) {
|
||||
parse_str($chunk, $values);
|
||||
|
||||
Reference in New Issue
Block a user