Skip to content

Commit

Permalink
fix - undefined array key boundaryStr and passing null to stripos
Browse files Browse the repository at this point in the history
  • Loading branch information
wencagh authored and f3l1x committed Aug 19, 2024
1 parent 04e5912 commit 392ca17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nusoap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 392ca17

Please sign in to comment.