Skip to content

Commit

Permalink
release version 1.1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
marcovtwout committed Dec 2, 2020
1 parent 0b5559b commit 445827f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
 Yii Framework Change Log
========================

Version 1.1.23 under development
--------------------------------
Version 1.1.23 December 2, 2020
-------------------------------

- Bug #4291: The scheme (protocol) is deleted when validateIDN is enabled after validation (Argevollen)
- Bug #4306: Add PHP 8 support (samdark)
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.23-dev';
return '1.1.23';
}

/**
Expand Down
35 changes: 29 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.23-dev';
return '1.1.23';
}
public static function createWebApplication($config=null)
{
Expand Down Expand Up @@ -900,7 +900,7 @@ public function evaluateExpression($_expression_,$_data_=array())
else
{
$_data_[]=$this;
return call_user_func_array($_expression_, $_data_);
return call_user_func_array($_expression_, array_values($_data_));
}
}
}
Expand Down Expand Up @@ -4193,7 +4193,12 @@ protected function runWithParamsInternal($object, $method, $params)
$name=$param->getName();
if(isset($params[$name]))
{
if($param->isArray())
if(version_compare(PHP_VERSION,'8.0','>=')) {
$isArray=$param->getType() && $param->getType()->getName()==='array';
} else {
$isArray=$param->isArray();
}
if($isArray)
$ps[]=is_array($params[$name]) ? $params[$name] : array($params[$name]);
elseif(!is_array($params[$name]))
$ps[]=$params[$name];
Expand Down Expand Up @@ -4707,7 +4712,19 @@ public function setCookieParams($value)
extract($data);
extract($value);
$this->freeze();
if(isset($httponly))
if(isset($httponly) && isset($samesite))
{
if(version_compare(PHP_VERSION,'7.3.0','>='))
session_set_cookie_params(array('lifetime'=>$lifetime,'path'=>$path,'domain'=>$domain,'secure'=>$secure,'httponly'=>$httponly,'samesite'=>$samesite));
else
{
// Work around for setting sameSite cookie prior PHP 7.3
// https://stackoverflow.com/questions/39750906/php-setcookie-samesite-strict/46971326#46971326
$path .= '; samesite=' . $samesite;
session_set_cookie_params($lifetime,$path,$domain,$secure,$httponly);
}
}
else if(isset($httponly))
session_set_cookie_params($lifetime,$path,$domain,$secure,$httponly);
else
session_set_cookie_params($lifetime,$path,$domain,$secure);
Expand Down Expand Up @@ -5815,7 +5832,11 @@ public static function errorSummary($model,$header=null,$footer=null,$htmlOption
foreach($errors as $error)
{
if($error!='')
$content.= '<li>'.self::encode($error)."</li>\n";
{
if (!isset($htmlOptions['encode']) || $htmlOptions['encode'])
$error=self::encode($error);
$content.= '<li>'.$error."</li>\n";
}
if($firstError)
break;
}
Expand All @@ -5835,7 +5856,9 @@ public static function errorSummary($model,$header=null,$footer=null,$htmlOption
public static function error($model,$attribute,$htmlOptions=array())
{
self::resolveName($model,$attribute); // turn [a][b]attr into attr
$error=self::encode($model->getError($attribute));
$error=$model->getError($attribute);
if (!isset($htmlOptions['encode']) || $htmlOptions['encode'])
$error=self::encode($error);
if($error!='')
{
if(!isset($htmlOptions['class']))
Expand Down

1 comment on commit 445827f

@cebe
Copy link
Member

@cebe cebe commented on 445827f Dec 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.