Skip to content

Commit

Permalink
Update Video.php (pimcore#15395)
Browse files Browse the repository at this point in the history
* Update Video.php

Pimcore\Model\Asset\Video::getThumbnailConfig(): Argument #1 ($config) must be of type Pimcore\Model\Asset\Video\Thumbnail\Config|string, null given, called in /var/www/html/vendor/pimcore/pimcore/models/Document/Editable/Video.php on line 492 File: /var/www/html/vendor/pimcore/pimcore/models/Asset/Video.php Line: 73

* Update Video.php

strpos(): Argument #1 ($haystack) must be of type string, int given File: /var/www/html/vendor/pimcore/pimcore/models/Document/Editable/Video.php Line: 938

some values arent strings
  • Loading branch information
j-jonas authored Jul 18, 2023
1 parent 35c2b6c commit 9f09132
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions models/Asset/Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ public function clearThumbnails(bool $force = false): void
/**
* @internal
*
* @param string|Video\Thumbnail\Config $config
* @param null|string|Video\Thumbnail\Config $config
*
* @return Video\Thumbnail\Config|null
*
* @throws Model\Exception\NotFoundException
*/
public function getThumbnailConfig(string|Video\Thumbnail\Config $config): ?Video\Thumbnail\Config
public function getThumbnailConfig(null|string|Video\Thumbnail\Config $config): ?Video\Thumbnail\Config
{
$thumbnail = null;

Expand Down
2 changes: 1 addition & 1 deletion models/Document/Editable/Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ private function getHtml5Code(array $urls = [], Asset\Video\ImageThumbnail|Asset
$attributesString .= ' ' . $key;
if (!empty($value)) {
$quoteChar = '"';
if (strpos($value, '"')) {
if (is_string($value) && strpos($value, '"')) {
$quoteChar = "'";
}
$attributesString .= '=' . $quoteChar . $value . $quoteChar;
Expand Down

0 comments on commit 9f09132

Please sign in to comment.