File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,13 @@ public function getFlickr(bool $authenticate = false): PhpFlickr
3030 $ apiSecret = getenv ('FLICKR_API_SECRET ' );
3131 $ accessToken = getenv ('FLICKR_ACCESS_TOKEN ' );
3232 $ accessTokenSecret = getenv ('FLICKR_ACCESS_SECRET ' );
33- if (empty ($ apiKey ) && file_exists (__DIR__ . '/config.php ' )) {
34- require __DIR__ . '/config.php ' ;
33+ $ configFile = __DIR__ . '/config.php ' ;
34+ if (empty ($ apiKey ) && file_exists ($ configFile )) {
35+ require $ configFile ;
3536 }
3637 if (empty ($ apiKey )) {
3738 // Skip if no key found, so PRs from forks can still be run in CI.
38- static ::markTestSkipped ('No Flickr API key set. ' );
39+ static ::markTestSkipped ('No Flickr API key set (in either the FLICKR_* env vars or ' . $ configFile . ' ) ' );
3940 }
4041 try {
4142 $ this ->flickrs [$ authed ] = new PhpFlickr ($ apiKey , $ apiSecret );
You can’t perform that action at this time.
0 commit comments