-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
[Bug] Unable to send subscription expiration reminder,there is an error in PHP #717
Comments
Hi. Sorry for the delay. |
However, I did not define custom headers, and the custom header is empty |
I think the custom header should be in JSON format, because I don't need a custom header, so I entered {}, solved the problem, and everything works fine. But when I don't fill it in, there is a problem, which needs to be optimized. |
It should be set to {} by default in the backend of the program when not filled in |
And, I have a new suggestion. Notification content should be translated according to the user's language, these important notifications need to be read as soon as possible. Using the user's native language can help users understand the information more quickly and conveniently. |
I configured ntfy as the notification service, and it has been enabled. After clicking the test button, I found that notifications can be sent normally. This proves that my notification configuration is correct. Next, I added a test subscription, and its content is as follows.
![Image](https://private-user-images.githubusercontent.com/80586922/408060589-783f68ce-ee45-4b18-bc6e-7599083f9666.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NDk2ODQsIm5iZiI6MTczOTU0OTM4NCwicGF0aCI6Ii84MDU4NjkyMi80MDgwNjA1ODktNzgzZjY4Y2UtZWU0NS00YjE4LWJjNmUtNzU5OTA4M2Y5NjY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDE2MDk0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmZWQxNjgzZTViNTFkZWY5Y2Y1NjIzMDE3NzU4ZjBmN2Y4ODE5MmYzYTdjOWU2MDgxNmVjNWU5MmRkZTg3NTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.uOZfNK4CFaEU4K5z4IDXlVEaZ-ukkqJrUfnr09SKPIQ)
The date I tested is 2025/01/30, which should send a notification today because I set it one day in advance. However, I did not receive any notification. An error occurred after manually running the scheduled task "Send Notifications" in the Admin panel, the content is as follows:
For user: RainPaper
Next payment date: January 31, 2025
Current date: January 30, 2025
Difference: 1
Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /var/www/html/endpoints/cronjobs/sendnotifications.php:545
Stack trace:
#0 /var/www/html/endpoints/cronjobs/sendnotifications.php(545): array_keys(NULL)
#1 {main}
thrown in /var/www/html/endpoints/cronjobs/sendnotifications.php on line 545
I don't know what the problem is, I have no leads, can you help me?
The text was updated successfully, but these errors were encountered: