Commit 78ae6325 by Alexander Makarov

Fixes #4812

parent 51300fc9
...@@ -139,7 +139,7 @@ class LogTarget extends Target ...@@ -139,7 +139,7 @@ class LogTarget extends Target
$summary = [ $summary = [
'tag' => $this->tag, 'tag' => $this->tag,
'url' => $request->getAbsoluteUrl(), 'url' => $request->getAbsoluteUrl(),
'ajax' => $request->getIsAjax(), 'ajax' => (int)$request->getIsAjax(),
'method' => $request->getMethod(), 'method' => $request->getMethod(),
'ip' => $request->getUserIP(), 'ip' => $request->getUserIP(),
'time' => time(), 'time' => time(),
......
...@@ -27,7 +27,7 @@ class SameAs extends Base ...@@ -27,7 +27,7 @@ class SameAs extends Base
public function match($value) public function match($value)
{ {
if ($this->partial) { if ($this->partial) {
return mb_stripos($value, $this->baseValue, \Yii::$app->charset) !== false; return mb_stripos($value, $this->baseValue, 0, \Yii::$app->charset) !== false;
} else { } else {
return strcmp(mb_strtoupper($this->baseValue, \Yii::$app->charset), mb_strtoupper($value, \Yii::$app->charset)) === 0; return strcmp(mb_strtoupper($this->baseValue, \Yii::$app->charset), mb_strtoupper($value, \Yii::$app->charset)) === 0;
} }
......
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