I have a problem configuring session in yii. Appreciate any help!
As soon as I added a session parm to config/main.php like below, I get a PHP Error,
"Invalid argument supplied for foreach()".
'components'=>array(
.....
// Session
'session' =>array(
'autoStart' => true,
),
),
/var/www/yii-1.1.8.r3324/framework/collections/CMap.php(277)
265 * will overwrite the former (different from array_merge_recursive).
266 * Recursive merging will be conducted if both arrays have an element of array
267 * type and are having the same key.
268 * For integer-keyed elements, the elements from the latter array will
269 * be appended to the former array.
270 * @param array $a array to be merged to
271 * @param array $b array to be merged from
272 * @return array the merged array (the original arrays are not changed.)
273 * @see mergeWith
274 */
275 public static function mergeArray($a,$
276 {
277 foreach($b as $k=>$v)
278 {
279 if(is_integer($k))
280 isset($a[$k]) ? $a[]=$v : $a[$k]=$v;
281 else if(is_array($v) && isset($a[$k]) && is_array($a[$k]))
282 $a[$k]=self::mergeArray($a[$k],$v);
283 else
284 $a[$k]=$v;
285 }
286 return $a;
287 }
288
289