I am using Cake 1.2

I am trying to add the following function to my app_controller - from bakery article Redirects with Ajax - http://bakery.cakephp.org/articles/view/92

=======================================
  function redirect($url, $status = null, $die = true) {
      if ($this->RequestHandler->isAjax() || isset ($this->params['requested'])) {
          echo $this->requestAction($url, array (
                  'return'
              ));
      } else {
          parent :: redirect($url, $status);
      }
      if ($die) {
          die;
      } else {
          return false;
      }
  }    
========================================

I keep getting the following error:
Fatal error: Call to a member function on a non-object in C:\Documents and Settings\Danielle\My Documents\WebDevelopment\Current Projects\app\app_controller.php on line 44

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to