Skip to content

Commit

Permalink
Merge pull request tripal#1679 from tripal/tv4g4-issue1501-fopen-exce…
Browse files Browse the repository at this point in the history
…ption-handler

Do not display fopen error messages
  • Loading branch information
dsenalik authored Nov 7, 2023
2 parents 62a8b4d + 43b1403 commit 36ea116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tripal_chado/src/Plugin/TripalImporter/TaxonomyImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ private function updateExisting($root_taxon = NULL) {
while (($retries > 0) and (!$rfh)) {
$start = microtime(TRUE);
// Get the search response from NCBI.
$rfh = fopen($search_url, "r");
$rfh = @fopen($search_url, "r");
// If error, delay then retry
if ((!$rfh) and ($retries)) {
$this->logger->warning("Error contacting NCBI to look up @sci_name, will retry",
Expand Down Expand Up @@ -810,7 +810,7 @@ private function importRecord($taxid, $root_taxon = NULL, $organism = NULL) {
$retries = 3;
while (($retries > 0) and (!$rfh)) {
$start = microtime(TRUE);
$rfh = fopen($fetch_url, "r");
$rfh = @fopen($fetch_url, "r");
if ($rfh) {
$xml_text = '';
while (!feof($rfh)) {
Expand Down

0 comments on commit 36ea116

Please sign in to comment.