Post by turbomadmin » Sun Mar 26, 2017 11:25 pm

Bump.
Has anyone figured out how to solve the error yet?
I looked all over the forum but there doesn't seem to be a proper solution for this.
I've already deleted all my extensions before upgrading but I still get the same error of
Catchable fatal error: Argument 2 passed to Event::trigger() must be of the type array, string given, called in C:\xampp\htdocs\test\system\storage\modification\system\engine\loader.php on line 130 and defined in C:\xampp\htdocs\test\system\engine\event.php on line 19

Newbie

Posts

Joined
Mon Oct 31, 2016 9:39 am

Post by ashwani_multi » Mon Mar 27, 2017 1:17 pm

HI

its error come from model file can you tell me when you get this error

Opencart Quick checkout
View All modules
Any opencart issue contact me at support@opencartextensions.in

Thank you


User avatar
New member

Posts

Joined
Tue Dec 09, 2014 2:40 pm
Location - Ludhiana,Punjab,India

Post by turbomadmin » Mon Mar 27, 2017 6:43 pm

I get this error after I've uploaded files of OC 2.3 using FTP to my root folder and try to access localhost/test/install/.
Which model file are you referring to?

C:\xampp\htdocs\test\system\storage\modification\system\engine\loader.php on line 130

Code: Select all

	public function language($route) {
		$this->registry->get('event')->trigger('language/' . $route . '/before', $route); //line 130
		
		$output = $this->registry->get('language')->load($route);
		
		$this->registry->get('event')->trigger('language/' . $route . '/after', $route);
		
		return $output;
	}
C:\xampp\htdocs\test\system\engine\event.php on line 19

Code: Select all

	public function trigger($event, array $args = array()) { //line 19
		foreach ($this->data as $trigger => $actions) {
			if (preg_match('/^' . str_replace(array('\*', '\?'), array('.*', '.'), preg_quote($trigger, '/')) . '/', $event)) {
				foreach ($actions as $action) {
					$result = $action->execute($this->registry, $args);

					if (!is_null($result) && !($result instanceof Exception)) {
						return $result;
					}
				}
			}
		}
	}

Newbie

Posts

Joined
Mon Oct 31, 2016 9:39 am

Post by miguelal » Sun Dec 10, 2017 8:54 pm

I know this is an old thread but it was the one highest ranked in Google for this issue and since I've only now gotten around to upgrading my OC to the oldest v2 I thought I'd share my findings:

In system/engine/event.php
Change:
public function trigger($event, array $args = array()) {
To:
public function trigger($event, $args = array()) {

PHP version issue? No time to dig any further. Just leaving this in the hopes it might help someone.

Newbie

Posts

Joined
Wed Jul 24, 2013 5:32 am

Post by straightlight » Sun Dec 10, 2017 11:14 pm

miguelal wrote:
Sun Dec 10, 2017 8:54 pm
I know this is an old thread but it was the one highest ranked in Google for this issue and since I've only now gotten around to upgrading my OC to the oldest v2 I thought I'd share my findings:

In system/engine/event.php
Change:
public function trigger($event, array $args = array()) {
To:
public function trigger($event, $args = array()) {

PHP version issue? No time to dig any further. Just leaving this in the hopes it might help someone.
Then how does this post actually help someone in the future exactly? I don't get it ...

The error indicated above from prior posts originates from the system//storage folder. There are countless topics on my behalf responding to those inquiries. The system/storage folder must be located outside of the public_html folder and the path must be reconfigured accordingly from your config.php and admin/config.php . If you landed on this topic from Google which might probably the only topic that these indications were excluded, then it might simply be another reason for me why I should NOT use Google to track topics.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 187 guests