mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
fixed argument display in errorHandler
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
<?php if ($method !== null): ?>
|
||||
<span class="call">
|
||||
<?php if ($file !== null) echo '–' ?>
|
||||
<?= $class !== null ? $handler->addTypeLinks("$class::$method(" . $handler->argumentsToString($args) . ")") : $handler->htmlEncode($method) . '(' . $handler->argumentsToString($args) . ')' ?>
|
||||
<?= ($class !== null ? $handler->addTypeLinks("$class::$method") : $handler->htmlEncode($method)) . '(' . $handler->argumentsToString($args) . ')' ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<span class="at"><?php if ($line !== null) echo 'at line'; ?></span>
|
||||
|
@ -156,11 +156,10 @@ class ErrorHandler extends \yii\base\ErrorHandler
|
||||
*/
|
||||
public function addTypeLinks($code)
|
||||
{
|
||||
if (preg_match('/(.*?)::([^(]+)\((.*)\)/', $code, $matches)) {
|
||||
if (preg_match('/(.*?)::([^(]+)/', $code, $matches)) {
|
||||
$class = $matches[1];
|
||||
$method = $matches[2];
|
||||
$args = $matches[3];
|
||||
$text = $this->htmlEncode($class) . '::' . $this->htmlEncode($method) . '(' . $args . ')';
|
||||
$text = $this->htmlEncode($class) . '::' . $this->htmlEncode($method);
|
||||
} else {
|
||||
$class = $code;
|
||||
$text = $this->htmlEncode($class);
|
||||
|
Reference in New Issue
Block a user