From 7e756492fd3569aa50affaccdda4243ac764b3df Mon Sep 17 00:00:00 2001 From: Millyn Date: Fri, 24 Jan 2020 15:19:35 +0800 Subject: [PATCH] fix php 7.4 join(): Passing glue string after array is deprecated. --- lib/MultiPartForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MultiPartForm.php b/lib/MultiPartForm.php index d9b29d6..e4fcfc3 100644 --- a/lib/MultiPartForm.php +++ b/lib/MultiPartForm.php @@ -118,11 +118,11 @@ public function __toString() // Flatten the list and add closing boundary marker, // then return CR+LF separated data - $parts = array_map(function($val) {return join($val, "\r\n");}, $parts); + $parts = array_map(function($val) {return implode("\r\n", $val);}, $parts); $end_boundary = $part_boundary . "--"; array_push($parts, $end_boundary); - return join($parts, "\r\n"); + return implode("\r\n", $parts); } } ?>