diff --git a/CHANGELOG b/CHANGELOG index 45bdfde1b3..c76cfbc172 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,8 +1,8 @@  Yii Framework Change Log ======================== -Version 1.1.21 under development --------------------------------- +Version 1.1.21 April 2, 2019 +---------------------------- - Bug #4220: Fixed PHP 7.2 incompatibility caused by the use of `create_function` in CHttpRequest and CProfileLogRoute (martinpetrasch, freezy-sk) - Bug #4229: Remove deprecation errors from framework/web/js/source/jquery.yiiactiveform.js when using jQuery 3.1.1 (kenguest) diff --git a/framework/YiiBase.php b/framework/YiiBase.php index f65c860e1b..e6f7050136 100644 --- a/framework/YiiBase.php +++ b/framework/YiiBase.php @@ -87,7 +87,7 @@ class YiiBase */ public static function getVersion() { - return '1.1.21-dev'; + return '1.1.21'; } /** diff --git a/framework/yiilite.php b/framework/yiilite.php index b998fc14b2..8bdfcdf3be 100644 --- a/framework/yiilite.php +++ b/framework/yiilite.php @@ -41,7 +41,7 @@ class YiiBase private static $_logger; public static function getVersion() { - return '1.1.21-dev'; + return '1.1.21'; } public static function createWebApplication($config=null) { @@ -2805,6 +2805,13 @@ public function getPreferredAcceptType() $preferredAcceptTypes=$this->getPreferredAcceptTypes(); return empty($preferredAcceptTypes) ? false : $preferredAcceptTypes[0]; } + private function stringCompare($a, $b) + { + if ($a[0] == $b[0]) { + return 0; + } + return ($a[0] < $b[0]) ? 1 : -1; + } public function getPreferredLanguages() { if($this->_preferredLanguages===null) @@ -2821,7 +2828,7 @@ public function getPreferredLanguages() if($q) $languages[]=array((float)$q,$matches[1][$i]); } - usort($languages,create_function('$a,$b','if($a[0]==$b[0]) {return 0;} return ($a[0]<$b[0]) ? 1 : -1;')); + usort($languages, array($this, 'stringCompare')); foreach($languages as $language) $sortedLanguages[]=$language[1]; } @@ -4680,10 +4687,12 @@ public function setCookieParams($value) $data=session_get_cookie_params(); extract($data); extract($value); + $this->freeze(); if(isset($httponly)) session_set_cookie_params($lifetime,$path,$domain,$secure,$httponly); else session_set_cookie_params($lifetime,$path,$domain,$secure); + $this->unfreeze(); } public function getCookieMode() { @@ -4744,7 +4753,9 @@ public function getUseTransparentSessionID() } public function setUseTransparentSessionID($value) { + $this->freeze(); ini_set('session.use_trans_sid',$value?'1':'0'); + $this->unfreeze(); } public function getTimeout() { @@ -4752,7 +4763,9 @@ public function getTimeout() } public function setTimeout($value) { + $this->freeze(); ini_set('session.gc_maxlifetime',$value); + $this->unfreeze(); } public function openSession($savePath,$sessionName) { @@ -10727,4 +10740,4 @@ interface ILogFilter { public function filter(&$logs); } -?> +?> \ No newline at end of file