Skip to content

Commit 445827f

Browse files
committed
release version 1.1.23
1 parent 0b5559b commit 445827f

File tree

3 files changed

+32
-9
lines changed

3 files changed

+32
-9
lines changed

CHANGELOG

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
 Yii Framework Change Log
22
========================
33

4-
Version 1.1.23 under development
5-
--------------------------------
4+
Version 1.1.23 December 2, 2020
5+
-------------------------------
66

77
- Bug #4291: The scheme (protocol) is deleted when validateIDN is enabled after validation (Argevollen)
88
- Bug #4306: Add PHP 8 support (samdark)

framework/YiiBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class YiiBase
8787
*/
8888
public static function getVersion()
8989
{
90-
return '1.1.23-dev';
90+
return '1.1.23';
9191
}
9292

9393
/**

framework/yiilite.php

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class YiiBase
4141
private static $_logger;
4242
public static function getVersion()
4343
{
44-
return '1.1.23-dev';
44+
return '1.1.23';
4545
}
4646
public static function createWebApplication($config=null)
4747
{
@@ -900,7 +900,7 @@ public function evaluateExpression($_expression_,$_data_=array())
900900
else
901901
{
902902
$_data_[]=$this;
903-
return call_user_func_array($_expression_, $_data_);
903+
return call_user_func_array($_expression_, array_values($_data_));
904904
}
905905
}
906906
}
@@ -4193,7 +4193,12 @@ protected function runWithParamsInternal($object, $method, $params)
41934193
$name=$param->getName();
41944194
if(isset($params[$name]))
41954195
{
4196-
if($param->isArray())
4196+
if(version_compare(PHP_VERSION,'8.0','>=')) {
4197+
$isArray=$param->getType() && $param->getType()->getName()==='array';
4198+
} else {
4199+
$isArray=$param->isArray();
4200+
}
4201+
if($isArray)
41974202
$ps[]=is_array($params[$name]) ? $params[$name] : array($params[$name]);
41984203
elseif(!is_array($params[$name]))
41994204
$ps[]=$params[$name];
@@ -4707,7 +4712,19 @@ public function setCookieParams($value)
47074712
extract($data);
47084713
extract($value);
47094714
$this->freeze();
4710-
if(isset($httponly))
4715+
if(isset($httponly) && isset($samesite))
4716+
{
4717+
if(version_compare(PHP_VERSION,'7.3.0','>='))
4718+
session_set_cookie_params(array('lifetime'=>$lifetime,'path'=>$path,'domain'=>$domain,'secure'=>$secure,'httponly'=>$httponly,'samesite'=>$samesite));
4719+
else
4720+
{
4721+
// Work around for setting sameSite cookie prior PHP 7.3
4722+
// https://stackoverflow.com/questions/39750906/php-setcookie-samesite-strict/46971326#46971326
4723+
$path .= '; samesite=' . $samesite;
4724+
session_set_cookie_params($lifetime,$path,$domain,$secure,$httponly);
4725+
}
4726+
}
4727+
else if(isset($httponly))
47114728
session_set_cookie_params($lifetime,$path,$domain,$secure,$httponly);
47124729
else
47134730
session_set_cookie_params($lifetime,$path,$domain,$secure);
@@ -5815,7 +5832,11 @@ public static function errorSummary($model,$header=null,$footer=null,$htmlOption
58155832
foreach($errors as $error)
58165833
{
58175834
if($error!='')
5818-
$content.= '<li>'.self::encode($error)."</li>\n";
5835+
{
5836+
if (!isset($htmlOptions['encode']) || $htmlOptions['encode'])
5837+
$error=self::encode($error);
5838+
$content.= '<li>'.$error."</li>\n";
5839+
}
58195840
if($firstError)
58205841
break;
58215842
}
@@ -5835,7 +5856,9 @@ public static function errorSummary($model,$header=null,$footer=null,$htmlOption
58355856
public static function error($model,$attribute,$htmlOptions=array())
58365857
{
58375858
self::resolveName($model,$attribute); // turn [a][b]attr into attr
5838-
$error=self::encode($model->getError($attribute));
5859+
$error=$model->getError($attribute);
5860+
if (!isset($htmlOptions['encode']) || $htmlOptions['encode'])
5861+
$error=self::encode($error);
58395862
if($error!='')
58405863
{
58415864
if(!isset($htmlOptions['class']))

0 commit comments

Comments
 (0)