Arbit - project tracking

Dwoo

#51: Use user functions in {template}

Issue revisions

  • new by Michael Doehler at 2009-D-11 11:08
  • assigned by Jordi Boggiano at 2010-J-19 0:27
  • closed by Jordi Boggiano at 2010-J-19 0:27
Type bug bug
State closed closed
Priority normal normal
Resolution fixed fixed
Assigned to Jordi Boggiano
Scheduled for 1.1.1
Affected versions
Affected components Core
Last change Tuesday 19 January 2010 00:27:37 UTC by Jordi Boggiano
If you try to use user functions in {template} scope, you get an array for your 

public function __call($method, $args) {} in Dwoo.php

Because the first parameters is not an object, its null, to resolve this, add an check that the functions isnt be null,

	public function __call($method, $args) {
		if($this->getPluginProxy()!==null){
			return call_user_func_array($this->getPluginProxy()->getCallback($method), $args);
		}
	}


the second change is, that there is no function find, because the vars are all sets, so i changed the protected method getObjectPlugin to an public method, and it works ;)

Maybe you look up, why it istn callable, when its protected in the Dwoo scope...
  • Jordi Boggiano at Tuesday 19 January 2010 00:27:37 UTC

    I think the second change is enough.

    For the first, I will not silence errors, but it now throws an exception so that the error is more obvious.

    Fixed in revision #323, #324