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

handling no body on title:body arg #6

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

picklecillo
Copy link
Contributor

Hey @craftzdog!

Noticed creating a new note with no body like ink+ title gets a warning that shows up as a notification.
image

From the debugger:

Warning: Undefined array key 1 in /Users/picklecillo/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/524CB052-5DDF-40AA-A4E5-BED3DBE86F3E on line 16

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/picklecillo/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.3950022E-4F14-43AE-8C35-A64FE61E433D/inkdrop.php on line 62

to fix it, i'm using array_pad so that the expected second argument defaults to an empty string '' instead of null.

@craftzdog craftzdog merged commit a12be41 into inkdropapp:main Nov 19, 2024
@craftzdog
Copy link
Contributor

shipped 🙌 https://github.com/inkdropapp/inkdrop-alfred-workflow/releases/tag/v0.2.1

@picklecillo picklecillo deleted the fix/no-body-warning branch November 20, 2024 12:42
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.

2 participants