Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,11 @@ public function requestFromGithub()
$github = Helper::initializeGithub();

// If over the API limit, we can't build this list
if ($github->authorization->getRateLimit()->rate->remaining > 0)
if ($github->authorization->getRateLimit()->resources->core->remaining == 0)
{
throw new \RuntimeException(\JText::sprintf('COM_PATCHTESTER_API_LIMIT_LIST', \JFactory::getDate($this->rate->reset)));
}

// Sanity check, ensure there aren't any applied patches
if (count($this->getAppliedPatches()) >= 1)
{
Expand Down Expand Up @@ -347,11 +350,6 @@ public function requestFromGithub()
}
}
}
else
{
throw new \RuntimeException(\JText::sprintf('COM_PATCHTESTER_API_LIMIT_LIST', \JFactory::getDate($this->rate->reset)));
}
}

/**
* Gets an array of objects from the results of database query.
Expand Down