17488 Posts in 4473 Topics by 1978 members
| Go to End | ||
| Author | Topic: | 2803 Views |
-
Re: Custom Function but parameter is always NULL

7 July 2008 at 12:46pm
It's not a bug.
What's happening is that the getPage() method defines an accessor for the $obj->Page property. So, in your PHP code, if you write $obj->Page, then it will get the value of that property by executing $obj->getPage().
Properties can't have arguments, so no arguments are ever passed to getPage() when it's used in this way.
The best solution here is to rename getCopyrightRange() to CopyrightRange().
-
Re: Custom Function but parameter is always NULL

7 July 2008 at 1:01pm
Makes sense, Sam.
Just a bit of a gotcha when it comes to using variables in templates, I guess.
Sean
| 2803 Views | ||
| Go to Top |


