Magento – Array to string conversion in Magento 2

magento2.2.2PHP

enter image description here

Notice: Array to string conversion in
/home/pacifi48/public_html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php
on line 2999 Magento 2 Version 2.2.2

How to solve???

Best Answer

To solve please do modification in below paths

Path : vendor/magento/framework/DB/Adapter/Pdo/Mysql.php
Under --> public function prepareColumnValue(array $column, $value)

Replace old code:

 case 'longtext':
    $value  = (string)$value;
    if ($column['NULLABLE'] && $value == '') {
        $value = null;
    }
    break;

With new code:

case 'longtext':
    if(!is_array($value)) $value  = (string)$value;
    else $value = '';
    if ($column['NULLABLE'] && $value == '') {
        $value = null;
    }
    break;

same error came to me now it solved

Related Topic