Skip to main contentSkip to footer

Undefined property: Proxy::method in storage/modification/system/engine/action.php on line

Rupak Nepali
Share:
Undefined property: Proxy::method in storage/modification/system/engine/action.php on line

Opencart error: Notice: Undefined property: Proxy::getLabels in /htdocs/storage/modification/system/engine/action.php on line 79

If you get an error like above then find the “getLabels” in your opencart directory and you can find two places like:

public function getLabels()
{

Or something like below of model reference or controller reference

$this->model_extension_module_outofstock->getLabels();

If it is model then check the class name of the model, for our example it should be like below:

class ModelExtensionModuleOutOfStock extends Model
{

Once you correct the class name then the proxy issue will be removed.

The main method is at system/engine/proxy.php

public function __call($key, $args) {
	$arg_data = array();
	
	$args = func_get_args();
	
	foreach ($args as $arg) {
		if ($arg instanceof Ref) {
			$arg_data[] =& $arg->getRef();
		} else {
			$arg_data[] =& $arg;
		}
	}
	
	if (isset($this->{$key})) {		
		return call_user_func_array($this->{$key}, $arg_data);	
	} else {
		$trace = debug_backtrace();
		
		exit('<b>Notice</b>:  Undefined property: Proxy::' . $key . ' in <b>' . $trace[1]['file'] . '</b> on line <b>' . $trace[1]['line'] . '</b>');
	}
}

Hope this helps someone, let us know if you have any questions or issues so that we try to solve it. We have listed out errors that you may get in Opencart and their solutions at:

Comments

Join the conversation and share your thoughts

Leave a Comment

Your comment will be reviewed before publishing.

Be the first to comment on this post!

Innovation

Let's Make Something Amazing Together

We always provide our best creative ideas at the highest level. Tell us about your project and we will make it work.

InnovateBringing innovative solutions to complex problems
AutomateStreamlining processes through automation
DominateLeading the market with exceptional results
Build Smarter and Launch FasterEfficient development for rapid deployment