I try to obtain last/previous URL and I can't get like an URL.
Here is my code:
lastUrl = Mage::app()->getResponse()->setRedirect($_SERVER['HTTP_REFERER']);
And I try extract the URL from this array, but it give me this error:
Cannot use object of type Mage_Core_Controller_Response_Http as array
using: var_dump($lastUrl['value'])
Or null if I try $lastUrl->value
How I can extract the URL as a string? I always have trouble with this arrays.