File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
administrator/components/com_patchtester/PatchTester/Controller Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,23 @@ public function execute()
4444
4545 // Make sure we can fetch the data from GitHub - throw an error on < 10 available requests
4646 $ github = Helper::initializeGithub ();
47- $ rate = $ github ->authorization ->getRateLimit ();
47+
48+ try
49+ {
50+ $ rate = $ github ->authorization ->getRateLimit ();
51+ }
52+ catch (\Exception $ e )
53+ {
54+ $ response = new \JResponseJson (
55+ new \Exception (
56+ \JText::sprintf ('COM_PATCHTESTER_COULD_NOT_CONNECT_TO_GITHUB ' , $ e ->getMessage ())
57+ )
58+ );
59+
60+ echo json_encode ($ response );
61+
62+ $ this ->getApplication ()->close (1 );
63+ }
4864
4965 // If over the API limit, we can't build this list
5066 if ($ rate ->resources ->core ->remaining < 10 )
You can’t perform that action at this time.
0 commit comments