mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
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:
parent
85b82a9c2f
commit
59de735095
@ -303,9 +303,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user