How to fix the Amasty's Extended Product Grid with Editor «PDO::quote() expects parameter 1 to be string, object given» / «Internal Server Error» bug in Magento 2.2?

Replace a line in the Amasty\Pgrid\Controller\Adminhtml\Index\InlineEdit::setData() method:

from

$product->addAttributeUpdate($key, $val, $this->store);

to:

$product->addAttributeUpdate($key, $val, $this->store->getId();

See also: