Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ResourceStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function generateHtmlIncludes($for = self::TYPE_CSS, ?int $priority = nul

public function getResources($type, ?int $priority = null, array $excludePriority = [])
{
if(isset($this->_store[$type][$priority]))
if($priority !== null && isset($this->_store[$type][$priority]))
{
return $this->_store[$type][$priority];
}
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/AbstractDispatchableResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected function _processContent()
$this->_dispatch();
}

$file = basename($this->_filePath);
$file = basename((string)$this->_filePath);
$preMinified = (strpos($file, '.min.') > 0 || strpos($file, '-min.') > 0);

//Return the raw content if minification has been disabled or @do-not-minify is set
Expand Down
4 changes: 2 additions & 2 deletions tests/Resources/GenericResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ public function testResource($ext, DispatchResource $class)
"woff" => "application/x-font-woff",
"zip" => "application/zip",
"pdf" => "application/pdf",
null => "application/octet-stream",
"" => "application/octet-stream",
];

$this->assertEquals($ext, $class->getExtension());
$this->assertEquals($extType[$ext], $class->getContentType());
$this->assertEquals($extType[$ext ?? ""], $class->getContentType());
}

public static function resourceProvider()
Expand Down
Loading