I have developed a custom module in magento 2. I have installed the module but getting error like below.

1 exception(s):
Exception #0 (Exception): Notice: Array to string conversion in /var/www/html/Magento-CE-2.1.9/vendor/magento/framework/Phrase.php on line 69

Exception #0 (Exception): Notice: Array to string conversion in /var/www/html/Magento-CE-2.1.9/vendor/magento/framework/Phrase.php on line 69

When I disable the module everything works perfect. Can anyone please let me how can I resolve this. I am using PHP Version 7.0.25 and Magento version 2.1.9

enter image description here

  • if possible then put our module code so one can check for the issue. The issue is somewhere string argument is required and you are passing array over there. Commented Jan 4, 2018 at 6:46
  • Could you please provide whole module here so we can debug and then come up with some solution ? Commented Jan 4, 2018 at 6:50

2 Answers 2


I know that this is old, but in my case i had the same problem and reach this issue here . It was an error in my system.xml payment method file, where i put the tag on a wrong place. So this problem can be a system.xml file with wrong configurations.

  • Yeah, that's it. Wrong tag placement. Commented Jul 20, 2022 at 8:05

My code snippet is from Magento 2.2 and things are more strict in Magento 2. Here it states clearly that you need to pass an array when you make an instance of the class.

public function __construct($text, array $arguments = [])

Or maybe you should develop your code in smaller steps. First use a generator to get a working framework for a module, like: https://mage2gen.com/ Then add your custom code bit by bit and when it fails, then you know where the error is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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