Skip to content

Commit ce49916

Browse files
committed
Only show API key error if one has been defined
1 parent 183f047 commit ce49916

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fields/fonts.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ protected function getInput()
5454
*/
5555
protected function getOptions()
5656
{
57+
// If we have no API key set at all, don't proceed.
58+
if ($this->getParams()->get('google-fonts-api-key', '') === '')
59+
{
60+
return;
61+
}
62+
5763
$options = new Registry;
5864
$options->set('userAgent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0');
5965
$http = HttpFactory::getHttp($options);

0 commit comments

Comments
 (0)