diff --git a/vendor/magento/module-visual-merchandiser/Model/Sorting/SortColor.php b/vendor/magento/module-visual-merchandiser/Model/Sorting/SortColor.php
index 3cec3a694cfb..59c5d51c07e3 100644
--- a/vendor/magento/module-visual-merchandiser/Model/Sorting/SortColor.php
+++ b/vendor/magento/module-visual-merchandiser/Model/Sorting/SortColor.php
@@ -10,10 +10,12 @@

 class SortColor extends SortAbstract implements SortInterface
 {
-    const XML_PATH_COLOR_ORDER = 'visualmerchandiser/options/color_order';
-    const XML_PATH_COLOR_ATTR = 'visualmerchandiser/options/color_attribute_code';
+    public const XML_PATH_COLOR_ORDER = 'visualmerchandiser/options/color_order';
+    public const XML_PATH_COLOR_ATTR = 'visualmerchandiser/options/color_attribute_code';

     /**
+     * Perform sorting.
+     *
      * @param \Magento\Catalog\Model\ResourceModel\Product\Collection $collection
      * @return \Magento\Catalog\Model\ResourceModel\Product\Collection
      */
@@ -22,7 +24,7 @@ public function sort(
     ) {
         $colorOrderConf = $this->scopeConfig->getValue(self::XML_PATH_COLOR_ORDER);

-        if (strlen(trim($colorOrderConf)) == 0) {
+        if (strlen(trim((string)$colorOrderConf)) === 0) {
             return $collection;
         }

@@ -54,6 +56,8 @@ public function sort(
     }

     /**
+     * Returns label.
+     *
      * @return string
      */
     public function getLabel()
