Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Custom Function but parameter is always NULL


Go to End
Reply


10 Posts   3201 Views

Avatar
Sam

Administrator, 685 Posts

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().

Avatar
Sean

Forum Moderator, 922 Posts

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

Go to Top