Skip to content

Commit

Permalink
Release version 1.1.28
Browse files Browse the repository at this point in the history
  • Loading branch information
marcovtwout committed Feb 28, 2023
1 parent 59f31ae commit 23448da
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Yii Framework Change Log
========================

Version 1.1.28 under development
Version 1.1.28 February 28, 2023
--------------------------------

- Bug #4484: Set Last-Modified after sending cache control headers (jannis701, wtommyw)
Expand Down
2 changes: 1 addition & 1 deletion framework/YiiBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class YiiBase
*/
public static function getVersion()
{
return '1.1.28-dev';
return '1.1.28';
}

/**
Expand Down
25 changes: 19 additions & 6 deletions framework/yiilite.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class YiiBase
private static $_logger;
public static function getVersion()
{
return '1.1.28-dev';
return '1.1.28';
}
public static function createWebApplication($config=null)
{
Expand Down Expand Up @@ -2553,9 +2553,22 @@ protected function decodePathInfo($pathInfo)
}
else
{
return utf8_encode($pathInfo);
return $this->utf8Encode($pathInfo);
}
}
private function utf8Encode($s)
{
$s.=$s;
$len=strlen($s);
for ($i=$len>>1,$j=0; $i<$len; ++$i,++$j) {
switch (true) {
case $s[$i] < "\x80": $s[$j] = $s[$i]; break;
case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break;
default: $s[$j] = "\xC3"; $s[++$j] = chr(ord($s[$i]) - 64); break;
}
}
return substr($s, 0, $j);
}
public function getRequestUri()
{
if($this->_requestUri===null)
Expand Down Expand Up @@ -4326,7 +4339,7 @@ public function logout($destroySession=true)
if($this->identityCookie!==null)
{
$cookie=$this->createIdentityCookie($this->getStateKeyPrefix());
$cookie->value=null;
$cookie->value='';
$cookie->expire=0;
Yii::app()->getRequest()->getCookies()->add($cookie->name,$cookie);
}
Expand Down Expand Up @@ -5915,7 +5928,7 @@ public static function listData($models,$valueField,$textField,$groupField='')
public static function value($model,$attribute,$defaultValue=null)
{
if(is_scalar($attribute) || $attribute===null)
foreach(explode('.',$attribute) as $name)
foreach(explode('.',(string)$attribute) as $name)
{
if(is_object($model))
{
Expand Down Expand Up @@ -10443,9 +10456,9 @@ protected function validateAttribute($object,$attribute)
return;
}
if(function_exists('mb_strlen') && $this->encoding!==false)
$length=mb_strlen($value, $this->encoding ? $this->encoding : Yii::app()->charset);
$length=mb_strlen((string)$value, $this->encoding ? $this->encoding : Yii::app()->charset);
else
$length=strlen($value);
$length=strlen((string)$value);
if($this->min!==null && $length<$this->min)
{
$message=$this->tooShort!==null?$this->tooShort:Yii::t('yii','{attribute} is too short (minimum is {min} characters).');
Expand Down

0 comments on commit 23448da

Please sign in to comment.