Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit 59de73509506d25c4f949afe714db92f32c0d124 1 parent 85b82a9
@pauln pauln authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/formslib.php
View
5 lib/formslib.php
@@ -303,9 +303,8 @@ protected function _get_post_params() {
$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);
Please sign in to comment.
Something went wrong with that request. Please try again.