I am getting below error while compilation.

Notice: Undefined index: instance in /var/www/html/magenot2/vendor/magento/framework/Interception/PluginList/PluginList.php on line 196 

Anyone have any idea how to solve this.

Thank you

  • where you have used this "instance" variable? – P_U Dec 6 '17 at 8:02
  • @Nitz What is your Magento version? And what is your PHP version? – Khoa TruongDinh Dec 6 '17 at 9:48
  • Magento - 2.1.8 and php 7.0 – Nitz Dec 6 '17 at 11:16
  • I am also stuck on same problem. Any solution or how debug this issue? plz help. @P_U – Iftakharul Alam Jan 16 '19 at 12:42

Maybe you are trying to inject via constructor

public function __construct(
    \Magento\Framework\App\ObjectManager $objectManager
) {
    $this->objectManager = $objectManager::getInstance();

You should not use it via DI, use directly like static method.


In general, you MUST avoid to use this construction in your code. Only for testing or fast solution to get any object.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.