A call → code is a call to a protected property, which is no longer possible. You must use getCode (). Fixed code for 1.6:
if ($this->error->getCode() == '404') { header('Location: /index.php?option=com_content&view=article&id=214'); exit; } ;
Now it works for Yoomla 1.6. (as a fix for Example 1.5 at http://docs.joomla.org/Creating_a_Custom_404_Error_Page - the rest of this page is accurate)
source share