amzn / amzn/amazon-pay-api-sdk-php
main.CRITICAL: Warning: file_get_contents(): Filename cannot be empty in vendor/amzn/amazon-pay-api-sdk-php/Amazon/Pay/API/Client.php on line 424
- Dominant language
- PHP
- Stars
- 51
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
if `$key_spec = $this->config['private_key'];` on line 421 in https://github.com/amzn/amazon-pay-api-sdk-php/blob/2.2.5/Amazon/Pay/API/Client.php#L421 is empty, then an error is thrown on line 424 for `$contents = file_get_contents($key_spec);`:
```
main.CRITICAL: Warning: file_get_contents(): Filename cannot be empty in vendor/amzn/amazon-pay-api-sdk-php/Amazon/Pay/API/Client.php on line 424
```
Contributor guide
Research direction
Start in Amazon/Pay/API/Client.php around lines 421-424 and trace how the private_key configuration is supplied before file_get_contents is called. Reproduce the empty-key warning and determine the intended behavior for a missing private key; done means the configuration no longer produces this warning and the resulting behavior is covered by the project's existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100