Hi, I am getting this error on my redux settings page.
Undefined offset: 1 in p.php, line 211 #1758
It is because the preg_match returns one element in the array (atleast for me).
Because we are expecting two elements in the returned array, the solution would be to initialize an empty array with two elements, and perform a merge (just in case preg_split does not return two elements).
list( $header, $contents ) = array_merge( array( '', '' ), preg_split( '/([\r\n][\r\n])\1/', curl_exec( $ch ), 2 ) );