mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
adding fix for #1462 and an older error component file name
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3583 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
c3bd56d464
commit
29436a0ec5
2 changed files with 7 additions and 3 deletions
|
@ -109,11 +109,10 @@ class Component extends Object {
|
|||
}
|
||||
|
||||
if (!class_exists($componentCn)) {
|
||||
$componentFn = Inflector::underscore($component) . '.php';
|
||||
return $this->cakeError('missingComponentClass', array(array(
|
||||
'className' => $this->controller->name,
|
||||
'component' => $component,
|
||||
'file' => $componentFn,
|
||||
'file' => Inflector::underscore($component) . '.php',
|
||||
'base' => $this->controller->base
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -48,8 +48,13 @@ class ErrorHandler extends Object{
|
|||
function __construct($method, $messages) {
|
||||
parent::__construct();
|
||||
static $__previousError = null;
|
||||
|
||||
$allow = array('.', '/', '_');
|
||||
if(substr(PHP_OS,0,3) == "WIN") {
|
||||
$allow = array_merge($allow, array('\\', ':') );
|
||||
}
|
||||
$clean = new Sanitize();
|
||||
$messages = $clean->paranoid($messages, array('.', '/', '_'));
|
||||
$messages = $clean->paranoid($messages, $allow);
|
||||
$this->__dispatch =& new Dispatcher();
|
||||
|
||||
if ($__previousError != array($method, $messages)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue