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:
gwoo 2006-09-28 17:39:39 +00:00
parent c3bd56d464
commit 29436a0ec5
2 changed files with 7 additions and 3 deletions

View file

@ -109,11 +109,10 @@ class Component extends Object {
} }
if (!class_exists($componentCn)) { if (!class_exists($componentCn)) {
$componentFn = Inflector::underscore($component) . '.php';
return $this->cakeError('missingComponentClass', array(array( return $this->cakeError('missingComponentClass', array(array(
'className' => $this->controller->name, 'className' => $this->controller->name,
'component' => $component, 'component' => $component,
'file' => $componentFn, 'file' => Inflector::underscore($component) . '.php',
'base' => $this->controller->base 'base' => $this->controller->base
))); )));
} }

View file

@ -48,8 +48,13 @@ class ErrorHandler extends Object{
function __construct($method, $messages) { function __construct($method, $messages) {
parent::__construct(); parent::__construct();
static $__previousError = null; static $__previousError = null;
$allow = array('.', '/', '_');
if(substr(PHP_OS,0,3) == "WIN") {
$allow = array_merge($allow, array('\\', ':') );
}
$clean = new Sanitize(); $clean = new Sanitize();
$messages = $clean->paranoid($messages, array('.', '/', '_')); $messages = $clean->paranoid($messages, $allow);
$this->__dispatch =& new Dispatcher(); $this->__dispatch =& new Dispatcher();
if ($__previousError != array($method, $messages)) { if ($__previousError != array($method, $messages)) {