1 exception(s):
Exception #0 (Exception): Warning: strpos() expects parameter 1 to be string, array given in /home/equpo/public_html/demo/vendor/magento/module-eav/Model/Entity/Attribute/Source/Table.php on line 157
Exception #0 (Exception): Warning: strpos() expects parameter 1 to be string, array given in /home/equpo/public_html/demo/vendor/magento/module-eav/Model/Entity/Attribute/Source/Table.php on line 157
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'strpos() expect...', '/home/equpo/pub...', 157, Array)
#1 /home/equpo/public_html/demo/vendor/magento/module-eav/Model/Entity/Attribute/Source/Table.php(157): strpos(Array, ',')
#2 /home/equpo/public_html/demo/vendor/magento/module-eav/Model/Entity/Attribute/Frontend/AbstractFrontend.php(331): Magento\Eav\Model\Entity\Attribute\Source\Table->getOptionText(Array)
#3 /home/equpo/public_html/demo/vendor/magento/module-eav/Model/Entity/Attribute/Frontend/AbstractFrontend.php(176): Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend->getOption(Array)
when i open prouduct details page for all products
public function getOptionText($value)
{
$isMultiple = false;
if (strpos($value, ',')) {
$isMultiple = true;
$value = explode(',', $value);
}
$options = $this->getSpecificOptions($value, false);
if (!is_array($value)) {
$value = [$value];
}
$optionsText = [];
foreach ($options as $item) {
if (in_array($item['value'], $value)) {
$optionsText[] = $this->escaper->escapeHtml($item['label']);
}
}
how i can solve this???