Commit 78ae6325 by Alexander Makarov

Fixes #4812

parent 51300fc9
......@@ -139,7 +139,7 @@ class LogTarget extends Target
$summary = [
'tag' => $this->tag,
'url' => $request->getAbsoluteUrl(),
'ajax' => $request->getIsAjax(),
'ajax' => (int)$request->getIsAjax(),
'method' => $request->getMethod(),
'ip' => $request->getUserIP(),
'time' => time(),
......
......@@ -27,7 +27,7 @@ class SameAs extends Base
public function match($value)
{
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 {
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