dotpay / OpenCart

dotpay payment module for OpenCart
6 stars 4 forks source link

Błąd success.php przy wybraniu płatności przez dotPay #3

Open pr0woKator opened 6 years ago

pr0woKator commented 6 years ago
Warning: Missing argument 2 for Template::__construct(), called in /home/furtastic/domains/furtastic.pl/public_html/system/library/dotpay/TemplateLoader.php on line 63 and defined in /home/furtastic/domains/furtastic.pl/storage/modification/system/library/template.php on line 24Notice: Undefined variable: registry in /home/furtastic/domains/furtastic.pl/storage/modification/system/library/template.php on line 31Unknown: Argument 1 passed to Twig_Extension_DTwigManager::__construct() must be an instance of Registry, null given, called in /home/furtastic/domains/furtastic.pl/storage/modification/system/library/template/twig.php on line 53 and defined in /home/furtastic/domains/furtastic.pl/public_html/system/library/template/Twig/Extension/DTwigManager.php on line 17
Fatal error: Call to a member function get() on null in /home/furtastic/domains/furtastic.pl/public_html/system/library/template/Twig/Extension/DTwigManager.php on line 415
lstankiewicz commented 4 years ago

Hi,

I hat to change in "/system/library/dotpay/TemplateLoader.php" line 63. from $template = new \Template($this->registry->get('config')->get('template_engine')); to $template = new \Template($this->registry->get('config')->get('template_engine'),$this->registry);

I'm not a web developer and I didn't go through the entire code but in file "/storage/modification/system/library/template.php" line 24 public function __construct($adaptor, $registry) requires two arguments and logicaly $adaptor is _$this->registry->get('config')->get('templateengine') $registry is $this->registry After such change, cache cleanup, "Płatność z Dotpay" seems to work.

I hope developers of this module would review that and include this in the code (if this is a proper fix) or fix it properly :)