@@ -41,7 +41,7 @@ class YiiBase
4141 private static $ _logger ;
4242 public static function getVersion ()
4343 {
44- return '1.1.26-dev ' ;
44+ return '1.1.26 ' ;
4545 }
4646 public static function createWebApplication ($ config =null )
4747 {
@@ -1972,10 +1972,12 @@ protected function setReadOnly($value)
19721972 {
19731973 $ this ->_r =$ value ;
19741974 }
1975+ #[ReturnTypeWillChange]
19751976 public function getIterator ()
19761977 {
19771978 return new CMapIterator ($ this ->_d );
19781979 }
1980+ #[ReturnTypeWillChange]
19791981 public function count ()
19801982 {
19811983 return $ this ->getCount ();
@@ -2100,18 +2102,22 @@ public static function mergeArray($a,$b)
21002102 }
21012103 return $ res ;
21022104 }
2105+ #[ReturnTypeWillChange]
21032106 public function offsetExists ($ offset )
21042107 {
21052108 return $ this ->contains ($ offset );
21062109 }
2110+ #[ReturnTypeWillChange]
21072111 public function offsetGet ($ offset )
21082112 {
21092113 return $ this ->itemAt ($ offset );
21102114 }
2115+ #[ReturnTypeWillChange]
21112116 public function offsetSet ($ offset ,$ item )
21122117 {
21132118 $ this ->add ($ offset ,$ item );
21142119 }
2120+ #[ReturnTypeWillChange]
21152121 public function offsetUnset ($ offset )
21162122 {
21172123 $ this ->remove ($ offset );
@@ -2406,7 +2412,7 @@ public function getRestParams()
24062412 if ($ this ->_restParams ===null )
24072413 {
24082414 $ result =array ();
2409- if (strncmp ($ this ->getContentType (), 'application/json ' , 16 ) === 0 )
2415+ if (strncmp (( string ) $ this ->getContentType (), 'application/json ' , 16 ) === 0 )
24102416 $ result = CJSON ::decode ($ this ->getRawBody (), $ this ->jsonAsArray );
24112417 elseif (function_exists ('mb_parse_str ' ))
24122418 mb_parse_str ($ this ->getRawBody (), $ result );
@@ -2722,7 +2728,8 @@ public static function parseAcceptHeader($header)
27222728 $ matches =array ();
27232729 $ accepts =array ();
27242730 // get individual entries with their type, subtype, basetype and params
2725- preg_match_all ('/(?:\G\s?,\s?|^)(\w+|\*)\/(\w+|\*)(?:\+(\w+))?|(?<!^)\G(?:\s?;\s?(\w+)=([\w\.]+))/ ' ,$ header ,$ matches );
2731+ if ($ header !==null )
2732+ preg_match_all ('/(?:\G\s?,\s?|^)(\w+|\*)\/(\w+|\*)(?:\+(\w+))?|(?<!^)\G(?:\s?;\s?(\w+)=([\w\.]+))/ ' ,$ header ,$ matches );
27262733 // the regexp should (in theory) always return an array of 6 arrays
27272734 if (count ($ matches )===6 )
27282735 {
@@ -3312,7 +3319,7 @@ public function createPathInfo($params,$equal,$ampersand, $key=null)
33123319 if (is_array ($ v ))
33133320 $ pairs []=$ this ->createPathInfo ($ v ,$ equal ,$ ampersand , $ k );
33143321 else
3315- $ pairs []=urlencode ($ k ).$ equal .urlencode ($ v );
3322+ $ pairs []=urlencode ($ k ).$ equal .urlencode (( string ) $ v );
33163323 }
33173324 return implode ($ ampersand ,$ pairs );
33183325 }
@@ -4826,6 +4833,7 @@ public function gcSession($maxLifetime)
48264833 return true ;
48274834 }
48284835 //------ The following methods enable CHttpSession to be CMap-like -----
4836+ #[ReturnTypeWillChange]
48294837 public function getIterator ()
48304838 {
48314839 return new CHttpSessionIterator ;
@@ -4834,6 +4842,7 @@ public function getCount()
48344842 {
48354843 return count ($ _SESSION );
48364844 }
4845+ #[ReturnTypeWillChange]
48374846 public function count ()
48384847 {
48394848 return $ this ->getCount ();
@@ -4878,18 +4887,22 @@ public function toArray()
48784887 {
48794888 return $ _SESSION ;
48804889 }
4890+ #[ReturnTypeWillChange]
48814891 public function offsetExists ($ offset )
48824892 {
48834893 return isset ($ _SESSION [$ offset ]);
48844894 }
4895+ #[ReturnTypeWillChange]
48854896 public function offsetGet ($ offset )
48864897 {
48874898 return isset ($ _SESSION [$ offset ]) ? $ _SESSION [$ offset ] : null ;
48884899 }
4900+ #[ReturnTypeWillChange]
48894901 public function offsetSet ($ offset ,$ item )
48904902 {
48914903 $ _SESSION [$ offset ]=$ item ;
48924904 }
4905+ #[ReturnTypeWillChange]
48934906 public function offsetUnset ($ offset )
48944907 {
48954908 unset($ _SESSION [$ offset ]);
@@ -4937,7 +4950,7 @@ class CHtml
49374950 private static $ _modelNameConverter ;
49384951 public static function encode ($ text )
49394952 {
4940- return htmlspecialchars ($ text ,ENT_QUOTES ,Yii::app ()->charset );
4953+ return htmlspecialchars (( string ) $ text ,ENT_QUOTES ,Yii::app ()->charset );
49414954 }
49424955 public static function decode ($ text )
49434956 {
@@ -5380,7 +5393,7 @@ public static function checkBoxList($name,$select,$data,$htmlOptions=array())
53805393 $ checkAll =true ;
53815394 foreach ($ data as $ value =>$ labelTitle )
53825395 {
5383- $ checked =!is_array ($ select ) && !strcmp ($ value ,$ select ) || is_array ($ select ) && in_array ($ value ,$ select );
5396+ $ checked =!is_array ($ select ) && !strcmp ($ value ,( string ) $ select ) || is_array ($ select ) && in_array ($ value ,$ select );
53845397 $ checkAll =$ checkAll && $ checked ;
53855398 $ htmlOptions ['value ' ]=$ value ;
53865399 $ htmlOptions ['id ' ]=$ baseID .'_ ' .$ id ++;
@@ -5455,7 +5468,7 @@ public static function radioButtonList($name,$select,$data,$htmlOptions=array())
54555468 $ id =0 ;
54565469 foreach ($ data as $ value =>$ labelTitle )
54575470 {
5458- $ checked =!strcmp ($ value ,$ select );
5471+ $ checked =!strcmp ($ value ,( string ) $ select );
54595472 $ htmlOptions ['value ' ]=$ value ;
54605473 $ htmlOptions ['id ' ]=$ baseID .'_ ' .$ id ++;
54615474 $ option =self ::radioButton ($ name ,$ checked ,$ htmlOptions );
@@ -6034,7 +6047,7 @@ public static function listOptions($selection,$listData,&$htmlOptions)
60346047 else
60356048 {
60366049 $ attributes =array ('value ' =>(string )$ key ,'encode ' =>!$ raw );
6037- if (!is_array ($ selection ) && !strcmp ($ key ,$ selection ) || is_array ($ selection ) && in_array ($ key ,$ selection ))
6050+ if (!is_array ($ selection ) && !strcmp ($ key ,( string ) $ selection ) || is_array ($ selection ) && in_array ($ key ,$ selection ))
60386051 $ attributes ['selected ' ]='selected ' ;
60396052 if (isset ($ options [$ key ]))
60406053 $ attributes =array_merge ($ attributes ,$ options [$ key ]);
@@ -6116,7 +6129,7 @@ public static function resolveNameID($model,&$attribute,&$htmlOptions)
61166129 public static function resolveName ($ model ,&$ attribute )
61176130 {
61186131 $ modelName =self ::modelName ($ model );
6119- if (($ pos =strpos ($ attribute ,'[ ' ))!==false )
6132+ if (($ pos =strpos (( string ) $ attribute ,'[ ' ))!==false )
61206133 {
61216134 if ($ pos !==0 ) // e.g. name[a][b]
61226135 return $ modelName .'[ ' .substr ($ attribute ,0 ,$ pos ).'] ' .substr ($ attribute ,$ pos );
@@ -6878,10 +6891,12 @@ protected function setReadOnly($value)
68786891 {
68796892 $ this ->_r =$ value ;
68806893 }
6894+ #[ReturnTypeWillChange]
68816895 public function getIterator ()
68826896 {
68836897 return new CListIterator ($ this ->_d );
68846898 }
6899+ #[ReturnTypeWillChange]
68856900 public function count ()
68866901 {
68876902 return $ this ->getCount ();
@@ -7002,14 +7017,17 @@ public function mergeWith($data)
70027017 elseif ($ data !==null )
70037018 throw new CException (Yii::t ('yii ' ,'List data must be an array or an object implementing Traversable. ' ));
70047019 }
7020+ #[ReturnTypeWillChange]
70057021 public function offsetExists ($ offset )
70067022 {
70077023 return ($ offset >=0 && $ offset <$ this ->_c );
70087024 }
7025+ #[ReturnTypeWillChange]
70097026 public function offsetGet ($ offset )
70107027 {
70117028 return $ this ->itemAt ($ offset );
70127029 }
7030+ #[ReturnTypeWillChange]
70137031 public function offsetSet ($ offset ,$ item )
70147032 {
70157033 if ($ offset ===null || $ offset ===$ this ->_c )
@@ -7020,6 +7038,7 @@ public function offsetSet($offset,$item)
70207038 $ this ->insertAt ($ offset ,$ item );
70217039 }
70227040 }
7041+ #[ReturnTypeWillChange]
70237042 public function offsetUnset ($ offset )
70247043 {
70257044 $ this ->removeAt ($ offset );
@@ -7526,23 +7545,28 @@ public function getSafeAttributeNames()
75267545 unset($ attributes [$ name ]);
75277546 return array_keys ($ attributes );
75287547 }
7548+ #[ReturnTypeWillChange]
75297549 public function getIterator ()
75307550 {
75317551 $ attributes =$ this ->getAttributes ();
75327552 return new CMapIterator ($ attributes );
75337553 }
7554+ #[ReturnTypeWillChange]
75347555 public function offsetExists ($ offset )
75357556 {
75367557 return property_exists ($ this ,$ offset );
75377558 }
7559+ #[ReturnTypeWillChange]
75387560 public function offsetGet ($ offset )
75397561 {
75407562 return $ this ->$ offset ;
75417563 }
7564+ #[ReturnTypeWillChange]
75427565 public function offsetSet ($ offset ,$ item )
75437566 {
75447567 $ this ->$ offset =$ item ;
75457568 }
7569+ #[ReturnTypeWillChange]
75467570 public function offsetUnset ($ offset )
75477571 {
75487572 unset($ this ->$ offset );
@@ -8446,6 +8470,7 @@ protected function instantiate($attributes)
84468470 $ model =new $ class (null );
84478471 return $ model ;
84488472 }
8473+ #[ReturnTypeWillChange]
84498474 public function offsetExists ($ offset )
84508475 {
84518476 return $ this ->__isset ($ offset );
@@ -8825,6 +8850,8 @@ protected function initConnection($pdo)
88258850 $ pdo ->setAttribute (PDO ::ATTR_ERRMODE , PDO ::ERRMODE_EXCEPTION );
88268851 if ($ this ->emulatePrepare !==null && constant ('PDO::ATTR_EMULATE_PREPARES ' ))
88278852 $ pdo ->setAttribute (PDO ::ATTR_EMULATE_PREPARES ,$ this ->emulatePrepare );
8853+ if (PHP_VERSION_ID >= 80100 && strncasecmp ($ this ->getDriverName (),'sqlite ' ,6 )===0 )
8854+ $ pdo ->setAttribute (PDO ::ATTR_STRINGIFY_FETCHES , true );
88288855 if ($ this ->charset !==null )
88298856 {
88308857 $ driver =strtolower ($ pdo ->getAttribute (PDO ::ATTR_DRIVER_NAME ));
@@ -10663,22 +10690,27 @@ public function __construct(&$data)
1066310690 $ this ->_d =&$ data ;
1066410691 $ this ->_i =0 ;
1066510692 }
10693+ #[ReturnTypeWillChange]
1066610694 public function rewind ()
1066710695 {
1066810696 $ this ->_i =0 ;
1066910697 }
10698+ #[ReturnTypeWillChange]
1067010699 public function key ()
1067110700 {
1067210701 return $ this ->_i ;
1067310702 }
10703+ #[ReturnTypeWillChange]
1067410704 public function current ()
1067510705 {
1067610706 return $ this ->_d [$ this ->_i ];
1067710707 }
10708+ #[ReturnTypeWillChange]
1067810709 public function next ()
1067910710 {
1068010711 $ this ->_i ++;
1068110712 }
10713+ #[ReturnTypeWillChange]
1068210714 public function valid ()
1068310715 {
1068410716 return $ this ->_i <count ($ this ->_d );
0 commit comments