From 330f998a0ca39c8657520c07136cf64cb2dd5a15 Mon Sep 17 00:00:00 2001 From: wencagh <39371496+wencagh@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:09:50 +0200 Subject: [PATCH] fix - undefined array key boundaryStr and passing null to stripos --- src/nusoap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nusoap.php b/src/nusoap.php index ddd7029..f5bf034 100644 --- a/src/nusoap.php +++ b/src/nusoap.php @@ -6843,7 +6843,7 @@ function __construct($xml, $encoding = 'UTF-8', $method = '', $decode_utf8 = tru $substrXml = $xml; foreach($this->attachments as $key => $attachment) { $startPos = max( - stripos($substrXml, $attachment['boundaryStr']), + isset($attachment['boundaryStr']) ? stripos($substrXml, $attachment['boundaryStr']) : false, (array_key_exists('Content-Type', $attachment) ? stripos($substrXml, $attachment['Content-Type']) : 0), (array_key_exists('Content-Id', $attachment) ? stripos($substrXml, $attachment['Content-Id']) : 0), (array_key_exists('Content-Transfer-Encoding', $attachment) ? stripos($substrXml, $attachment['Content-Transfer-Encoding']) : 0)