Page 1 of 1

Calling member function get() on string in /wherever on line 44

Posted: Mon Jul 22, 2019 3:21 am
by dockeryz
The full error is this
Error: Call to a member function get() on string in /var/www/html/ecom/opencart/admin/controller/marketplace/extension.php on line 44
I am on the latest version of OpenCart, as I cloned it on github just yesterday. I've been re-installing this thing over and over again to no avail that will get rid of an annoying chain of errors.

If I go to Admin > Extensions > Extensions, the moment I click on this link, I'm redirected to the good ole error page. It's complaining about line 44 in the file

Code: Select all

Error: Call to a member function get() on string in /var/www/html/ecom/opencart/admin/controller/marketplace/extension.php on line 44
That line looks like this

Code: Select all

39				if ($this->user->hasPermission('access', 'extension/extension/' . $extension)) {
40					$files = glob(DIR_APPLICATION . 'controller/extension/' . $extension . '/*.php', GLOB_BRACE);
41
42					$data['categories'][] = array(
43						'code' => $extension,
44						'text' => $this->language->get('extension')->get('heading_title') . ' (' . count($files) . ')'
45					);
46				}
47
Obviously, it appears that get('extension') is a string, and the code is trying to use a method from it, but... it's a string, and it doesn't have methods like that. So, I change it to be just heading title

Code: Select all

39				if ($this->user->hasPermission('access', 'extension/extension/' . $extension)) {
40					$files = glob(DIR_APPLICATION . 'controller/extension/' . $extension . '/*.php', GLOB_BRACE);
41
42					$data['categories'][] = array(
43						'code' => $extension,
44						'text' => $this->language->get('heading_title') . ' (' . count($files) . ')'
45					);
46				}
47
That gets rid of the error, but now there's the same error for next extension was in the list in that directory. On, and on, until there aren't any leff to execute. When I got them all "fixed", the error disappeared, but there was a new error now. I then thought to myself, there must be some forum out there for asking questions about this software?

Does any one have any idea? Are you able to replicate this? I just want to get the Paypal payment system setup, the Express Checkout or Regular Checkout.

Re: Calling member function get() on string in /wherever on line 44

Posted: Mon Jul 22, 2019 7:43 am
by letxobnav
perhaps you should not use the github files but the regular releases.