Выдаёт ошибку:
Warning: Invalid argument supplied for foreach() in /.../index.php on line
114
Warning: Invalid argument supplied for foreach() in /.../index.php on line
114
Вот кусок кода:
function ParseCookie( $data ) {
$cookie = parseall( $data, 'Set-Cookie: ', ';' );
if( count( $cookie ) > 0 ) {
foreach( $cookie as $c ) {
list( $keyCookie, $valCoolie ) = explode( '=', $c, 2 );
$cookie[ $keyCookie ] = $valCoolie;
}
}
}
function getStrCookie() {
$strCookie = '';
foreach( $cookie as $keyCookie => $valCoolie ) {
$strCookie .= "{$keyCookie}={$valCoolie}; ";
}
$strCookie = substr( $strCookie, 0, strlen( $strCookie ) - 2 );
return $strCookie;
}
В данном случае это 13 строка, что может быть не так??