Magento – Getting Error in Magento 2.1 add to Product in Admin

errormagento-2.1magento2

I have created a new product in Magento 2.1 admin. I am getting the error shown below:

enter image description here

Warning: Illegal string offset 'is_in_stock' in […]/vendor/magento/module-catalog-inventory/Ui/DataProvider/Product/Form/Modifier/AdvancedInventory.php on line 87

Any idea what could cause this?

Best Answer

@johan , if you happen to be running PHP's OPCache extension on your server, please make sure opcache.save_comments is set to "1" in your opcache.ini file.

Though stripping comments can be par for the course in optimizing with OPCache, Magento 2.1 needs them for a getDocComments validation call in getExtensionAttributes method.

Related Topic