Commit ee2b968b by Carsten Brandt

fixed argument display in errorHandler

parent d3cb54bc
......@@ -20,7 +20,7 @@
<?php if ($method !== null): ?>
<span class="call">
<?php if ($file !== null) echo '&ndash;' ?>
<?= $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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment