Skip to content
Snippets Groups Projects
Commit 4b64c7c9 authored by Prasad's avatar Prasad
Browse files

PHP 8.x - Replaced create_function with inline function

parent a11a8fe1
No related branches found
No related tags found
No related merge requests found
......@@ -965,10 +965,11 @@ class HTTP_Request
// "normal" POST request
if (!isset($boundary)) {
$postdata = implode('&', array_map(
create_function('$a', 'return $a[0] . \'=\' . $a[1];'),
$this->_flattenArray('', $this->_postData)
));
$callback = function_exists('create_function')?
create_function('$a', 'return $a[0] . \'=\' . $a[1];') :
function ($a) { return $a[0] .'='. $a[1]; };
$postdata = implode('&', array_map($callback, $this->_flattenArray('', $this->_postData)));
// multipart request, probably with file uploads
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment