Przeglądaj źródła

Check if LWPs get call returns numeric content.

Adjokip 9 lat temu
rodzic
commit
de0911e497
1 zmienionych plików z 8 dodań i 1 usunięć
  1. 8 1
      OGP/ogp_agent.pl

+ 8 - 1
OGP/ogp_agent.pl

@@ -1877,7 +1877,14 @@ sub fetch_steam_version
 	
 	if ($response->is_success)
 	{
-		return $response->decoded_content;
+		my $content = $response->decoded_content;
+		
+		if ($content =~ /^\d+\z/)
+		{
+			return $content;
+		} else {
+			return -9;
+		}
 	} else {
 		return -10;
 	}