Skip to content

Commit

Permalink
Merge branch 'development' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddanbrown committed Nov 29, 2024
2 parents 5fba4a5 + 94165cc commit fb9c840
Show file tree
Hide file tree
Showing 16 changed files with 235 additions and 208 deletions.
2 changes: 2 additions & 0 deletions .github/translators.txt
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,5 @@ Mohammed srhiri (m.sghiri20) :: Arabic
YongMin Kim (kym0118) :: Korean
Rivo Zängov (Eraser) :: Estonian
Francisco Rafael Fonseca (chicoraf) :: Portuguese, Brazilian
ИEØ_ΙΙØZ (NEO_IIOZ) :: Chinese Traditional
madnjpn (madnjpn.) :: Georgian
4 changes: 3 additions & 1 deletion app/Access/Oidc/OidcUserinfoResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class OidcUserinfoResponse implements ProvidesClaims

public function __construct(ResponseInterface $response, string $issuer, array $keys)
{
$contentType = $response->getHeader('Content-Type')[0];
$contentTypeHeaderValue = $response->getHeader('Content-Type')[0] ?? '';
$contentType = strtolower(trim(explode(';', $contentTypeHeaderValue, 2)[0]));

if ($contentType === 'application/json') {
$this->claims = json_decode($response->getBody()->getContents(), true);
}
Expand Down
4 changes: 2 additions & 2 deletions app/Entities/Tools/PageIncludeParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ protected function splitTextNodesAtTags(DOMNode $textNode): array

if ($currentOffset < $tagStartOffset) {
$previousText = substr($text, $currentOffset, $tagStartOffset - $currentOffset);
$textNode->parentNode->insertBefore(new DOMText($previousText), $textNode);
$textNode->parentNode->insertBefore($this->doc->createTextNode($previousText), $textNode);
}

$node = $textNode->parentNode->insertBefore(new DOMText($tagOuterContent), $textNode);
$node = $textNode->parentNode->insertBefore($this->doc->createTextNode($tagOuterContent), $textNode);
$includeTags[] = new PageIncludeTag($tagInnerContent, $node);
$currentOffset = $tagStartOffset + strlen($tagOuterContent);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/RangeSupportedStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function parseRequest(Request $request): void
if ($start < 0 || $start > $end) {
$this->responseStatus = 416;
$this->responseHeaders['Content-Range'] = sprintf('bytes */%s', $this->fileSize);
} elseif ($end - $start < $this->fileSize - 1) {
} else {
$this->responseLength = $end < $this->fileSize ? $end - $start + 1 : -1;
$this->responseOffset = $start;
$this->responseStatus = 206;
Expand Down
9 changes: 9 additions & 0 deletions app/Util/HtmlDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use DOMElement;
use DOMNode;
use DOMNodeList;
use DOMText;
use DOMXPath;

/**
Expand Down Expand Up @@ -81,6 +82,14 @@ public function createElement(string $localName, string $value = ''): DOMElement
return $element;
}

/**
* Create a new text node within this document.
*/
public function createTextNode(string $text): DOMText
{
return $this->document->createTextNode($text);
}

/**
* Get an element within the document of the given ID.
*/
Expand Down
Loading

0 comments on commit fb9c840

Please sign in to comment.