Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in Alfred 4 using getenv() #15

Merged
merged 4 commits into from May 1, 2020
Merged

Fix bug in Alfred 4 using getenv() #15

merged 4 commits into from May 1, 2020

Conversation

jamesbellnet
Copy link
Contributor

After doing a fresh install of Alfred 4 then downloading this workflow today it wasn't working correctly - the ld keyword was fine but any query would cause Alfred to default to performing a web search.

After using the debugging tool in Alfred I could see the following:

PHP Notice: Undefined index: branch in [...]/laravel.php on line 18

I also noticed the URL for the Laravel documentation was missing the branch variable in the JSON response.

After a quick search I came across this and this in the Alfred forums, stating in PHP we should use getenv() over $_ENV. After updating the code I found it is working perfectly in Alfred 4.

@tillkruss
Copy link
Owner

Hey @jamesbellnet. It's working fine for me, what OS are you running?

`getenv('alfred_theme_subtext') ?? '0'` would be ideal, but let's KISS
@jamesbellnet
Copy link
Contributor Author

Hi @tillkruss, I'm running Catalina 10.15.4. I also upgraded my local install of PHP today via Homebrew to PHP 7.4.5 (cli).

@tillkruss tillkruss merged commit 91c27a3 into tillkruss:master May 1, 2020
@tillkruss
Copy link
Owner

Thanks! I released a new version. Let me know if that works.

@jamesbellnet
Copy link
Contributor Author

Yes just downloaded and tested and it all works fine! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants