Skip to content

Commit 82c0e4f

Browse files
committed
fix: patch up strpos error
1 parent 193648d commit 82c0e4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Request.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ public static function input($safeData = true)
102102
$data = [];
103103

104104
foreach (explode('&', $d) as $chunk) {
105-
$param = explode("=", $chunk);
105+
$param = explode('=', $chunk);
106106
$data[$param[0]] = $param[1];
107107
}
108-
} else if (strpos(Headers::get('Content-Type'), "application/json") !== 0 && strpos(Headers::get('Content-Type'), "multipart/form-data") !== 0) {
108+
} else if (strpos(Headers::get('Content-Type') ?? '', 'application/json') !== 0 && strpos(Headers::get('Content-Type'), 'multipart/form-data') !== 0) {
109109
$safeData = false;
110110
$data = [$data];
111111
} else {
@@ -467,7 +467,7 @@ public static function getUrl(): string
467467
$url = static::getScheme() . '://' . static::getHost();
468468

469469
if ((static::getScheme() === 'https' && static::getPort() !== 443) || (static::getScheme() === 'http' && static::getPort() !== 80)) {
470-
$url .= ":" . static::getPort();
470+
$url .= ':' . static::getPort();
471471
}
472472

473473
return $url;

0 commit comments

Comments
 (0)