mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Removing View::error(). Instead you should be handling error states in your controller, or throwing exceptions and letting the application error handling deal with the error.
This commit is contained in:
parent
3f61fa004e
commit
540f1426be
1 changed files with 0 additions and 15 deletions
|
@ -599,21 +599,6 @@ class View extends Object {
|
|||
$this->viewVars = $data + $this->viewVars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays an error page to the user. Uses layouts/error.ctp to render the page.
|
||||
*
|
||||
* @param integer $code HTTP Error code (for instance: 404)
|
||||
* @param string $name Name of the error (for instance: Not Found)
|
||||
* @param string $message Error message as a web page
|
||||
*/
|
||||
public function error($code, $name, $message) {
|
||||
header ("HTTP/1.1 {$code} {$name}");
|
||||
print ($this->_render(
|
||||
$this->_getLayoutFileName('error'),
|
||||
array('code' => $code, 'name' => $name, 'message' => $message)
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic accessor for helpers. Provides access to attributes that were deprecated.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue