How to fix the «Array to string conversion in Magento/Framework/DB/Adapter/Pdo/Mysql.php on line 2929» failure on a shipping address saving on the frontend checkoput page in Magento 2.1.x?

checkout
bug
bug-fix
shipping-address

(Dmitry Fedyuk) #1

Locate the code:

Add the following code below:

/**
 * 2018-02-01
 * How to fix the «Array to string conversion in Magento/Framework/DB/Adapter/Pdo/Mysql.php
 * on line 2929» failure on a shipping address saving
 * on the frontend checkout page in Magento 2.1.x?
 * https://mage2.pro/t/5357
 */
if (is_array($s = $address->getData('street'))) {
	$address->setData('street', implode("\n", $s));
}
if (is_array($s = $billingAddress->getData('street'))) {
	$billingAddress->setData('street', implode("\n", $s));
}

How did I upgrade earosacoustic.com from Magento 2.0.2 to 2.2.2?