5093 Posts in 1516 Topics by 1113 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1140 Views |
-
$this->request->getVar() error in controller

19 November 2010 at 12:56am
Hey guys,
This looks like something really simple but I just can't figure it out.
Front-end loads fine, dev/build works fine but when I try to go to admin I get:
Fatal error: Call to a member function getVar() on a non-object in /mysite/code/Page.php on line 23
Here's the offending function in Page.php:
function BigFont() {
$BigFont = $this->request->getVar('bigfont');
if($BigFont == 'true') {
return true;
} else {
return false;
}
}So it looks like I'm not accessing getVar properly. Strangely, it works on the front end of the site!
Any ideas?
-
Re: $this->request->getVar() error in controller

22 November 2010 at 8:59pm Last edited: 22 November 2010 9:02pm
Hi,
are you using ->getVar() in your Page class or Page_Controller class?
If it's in Page class, try
Controller::curr()->getRequest()->getVar()
If in Page_Controller, try
$this->getRequest()->getVar()
Greetings,
Rob
| 1140 Views | ||
|
Page:
1
|
Go to Top |


