mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
updating view error handling, fixes #4069 and fixes #4073, added long dash to escaped chr in http socket
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6439 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
89052b0f54
commit
6abbb882f5
2 changed files with 6 additions and 2 deletions
|
@ -931,7 +931,7 @@ class HttpSocket extends CakeSocket {
|
||||||
if (!empty($chars)) {
|
if (!empty($chars)) {
|
||||||
$escape = $chars;
|
$escape = $chars;
|
||||||
} else {
|
} else {
|
||||||
$escape = array('"', "(", ")", "<", ">", "@", ",", ";", ":", "\\", "/", "[", "]", "?", "=", "{", "}", " ");
|
$escape = array('"', "(", ")", "<", ">", "@", ",", ";", ":", "\\", "/", "[", "]", "?", "=", "{", "}", " ", "—");
|
||||||
for ($i = 0; $i <= 31; $i++) {
|
for ($i = 0; $i <= 31; $i++) {
|
||||||
$escape[] = chr($i);
|
$escape[] = chr($i);
|
||||||
}
|
}
|
||||||
|
|
|
@ -400,7 +400,7 @@ class View extends Object {
|
||||||
return $this->_render($file, array_merge($this->viewVars, $params), $loadHelpers);
|
return $this->_render($file, array_merge($this->viewVars, $params), $loadHelpers);
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = $paths[0] . 'views' . DS . 'elements' . DS . $name . $this->ext;
|
$file = $paths[0] . 'elements' . DS . $name . $this->ext;
|
||||||
|
|
||||||
if (Configure::read() > 0) {
|
if (Configure::read() > 0) {
|
||||||
return "Not Found: " . $file;
|
return "Not Found: " . $file;
|
||||||
|
@ -845,6 +845,10 @@ class View extends Object {
|
||||||
* @return cakeError
|
* @return cakeError
|
||||||
*/
|
*/
|
||||||
function _missingView($file, $error = 'missingView') {
|
function _missingView($file, $error = 'missingView') {
|
||||||
|
if (Configure::read() == 0) {
|
||||||
|
$this->cakeError('error404');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
$paths = $this->_paths($this->plugin);
|
$paths = $this->_paths($this->plugin);
|
||||||
$name = 'errors' . DS . Inflector::underscore($error);
|
$name = 'errors' . DS . Inflector::underscore($error);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue