Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #231084

    Hello,
    I have a concern by inserting a video in an article.
    It is in MP4 format and displays correctly but there are warning line of code that start at the top.
    Here is the location on my website: http://ecoledesvalettes.fr/morphing-cybercentre-cm1/
    Here is the code of the line 576:

    if(!function_exists('avia_is_200'))
    {
    	function avia_is_200($url)
    	{
    	    $options['http'] = array(
    	        'method' => "HEAD",
    	        'ignore_errors' => 1,
    	        'max_redirects' => 0
    	    );
    	    $body = file_get_contents($url, NULL, stream_context_create($options), 0, 1);
    	    sscanf($http_response_header[0], 'HTTP/%*d.%*d %d', $code);
    	    return $code === 200;
    	}
    }

    Thank you in advance
    Laure

    #231477

    Hi Laure!

    Please try to replace:

    
    $body = file_get_contents($url, NULL, stream_context_create($options), 0, 1);
    

    with:

    
    $body = @file_get_contents($url, NULL, stream_context_create($options), 0, 1);
    

    – does it fix the issue? If yes I’ll add the fix to the next theme update.

    Cheers!
    Peter

    #231904

    Hi Dude,
    Thank you very much!
    It’s working perfectly!
    Thank you again Peter :)
    Laure

    • This reply was modified 10 years, 9 months ago by Laure.
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Inserting Video code warning’ is closed to new replies.