Undefined offset: 1 php google drive wp media WordPress plugin

I'm using google drive WP media WordPress plugin for my WordPress site but this plugin keep give this error on my nginx server, can someone can help me fix this code

[error] 4437#4437: *175114 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined offset: 1 in /var/www/myhost/htdocs/wp-content/uploads/gdwpm_images/index.php on line 4
PHP message: PHP Notice:  Undefined offset: 1 in /var/www/myhost/htdocs/wp-content/uploads/gdwpm_images/index.php on line 4
PHP message: PHP Notice:  Undefined offset: 1 in /var/www/myhost/htdocs/wp-content/uploads/gdwpm_images/index.php on line 4" while reading response header from upstream, client: 122.167.98.6, server: myhost, request: "GET /wp-content/uploads/gdwpm_images/0B73eY08zeFxawYUhGOTA.jpg HTTP/1.1", upstream: "fastcgi://127.0.0.1:9070", host: "myhost", referrer: "http://...

and here's the gdwpm_image/index.php code

<?php
if (isset($_GET['imgid'])){
	$gdwpm_ekst_gbr = explode('.', $_GET['imgid']);
	if($gdwpm_ekst_gbr[1] == 'png' || $gdwpm_ekst_gbr[1] == 'gif' || $gdwpm_ekst_gbr[1] == 'bmp'){
		header("Content-Type: image/" . $gdwpm_ekst_gbr[1]);
	}else{
		header("Content-Type: image/jpg");
	}
	$gdurl = "https://docs.google.com/uc?id=" . $gdwpm_ekst_gbr[0] . "&export=view";
	@readfile($gdurl);
}
?>


I tried to fix the code, but no changes. Somebody can help to fix it? Thanks!

Relevant tags