From 9f091328f502c8137b062637f2b1f6efb8500df2 Mon Sep 17 00:00:00 2001 From: j-jonas Date: Tue, 18 Jul 2023 08:26:03 +0200 Subject: [PATCH] Update Video.php (#15395) * 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 --- models/Asset/Video.php | 4 ++-- models/Document/Editable/Video.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/models/Asset/Video.php b/models/Asset/Video.php index d0256dc7bdf..3c821daf2ed 100644 --- a/models/Asset/Video.php +++ b/models/Asset/Video.php @@ -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; diff --git a/models/Document/Editable/Video.php b/models/Document/Editable/Video.php index 25639ed6d5c..7cff93a96e6 100644 --- a/models/Document/Editable/Video.php +++ b/models/Document/Editable/Video.php @@ -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;