mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing non-unique id's being generated for Debugger rendered errors.
This commit is contained in:
parent
e857387a8e
commit
bd30510e87
2 changed files with 4 additions and 4 deletions
|
@ -607,7 +607,7 @@ class Debugger {
|
||||||
$this->_outputFormat = 'js';
|
$this->_outputFormat = 'js';
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['id'] = 'cakeErr' . count($this->errors);
|
$data['id'] = 'cakeErr' . uniqid();
|
||||||
$tpl = array_merge($this->_templates['base'], $this->_templates[$this->_outputFormat]);
|
$tpl = array_merge($this->_templates['base'], $this->_templates[$this->_outputFormat]);
|
||||||
$insert = array('context' => join("\n", $context), 'helpPath' => $this->helpPath) + $data;
|
$insert = array('context' => join("\n", $context), 'helpPath' => $this->helpPath) + $data;
|
||||||
|
|
||||||
|
|
|
@ -145,9 +145,9 @@ class DebuggerTest extends CakeTestCase {
|
||||||
'pre' => array('class' => 'cake-debug'),
|
'pre' => array('class' => 'cake-debug'),
|
||||||
'a' => array(
|
'a' => array(
|
||||||
'href' => "javascript:void(0);",
|
'href' => "javascript:void(0);",
|
||||||
'onclick' => "document.getElementById('cakeErr9-trace').style.display = " .
|
'onclick' => "preg:/document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display = " .
|
||||||
"(document.getElementById('cakeErr9-trace').style.display == 'none'" .
|
"\(document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display == 'none'" .
|
||||||
" ? '' : 'none');"
|
" \? '' \: 'none'\);/"
|
||||||
),
|
),
|
||||||
'b' => array(), 'Notice', '/b', ' (8)',
|
'b' => array(), 'Notice', '/b', ' (8)',
|
||||||
));
|
));
|
||||||
|
|
Loading…
Reference in a new issue