jcobhams / newsapi-php

A PHP client for the News API (https://newsapi.org/docs/get-started)
MIT License
39 stars 20 forks source link

Invalid SortBy Identifier Provided #2

Open rcoenen opened 2 years ago

rcoenen commented 2 years ago

Fatal error: Uncaught jcobhams\NewsApi\NewsApiException: Invalid SortBy Identifier Provided in /myproject/vendor/jcobhams/newsapi/src/NewsApi.php:120 Stack trace: #0

You are using Helpers::isLanguageValid in NewsApi.php whereas you should be using Helpers::isSortByValid

jcobhams commented 2 years ago

Thanks for the catch. Open a PR?

rcoenen commented 2 years ago

No idea how to do that, sorry

On Tue, Aug 31, 2021 at 12:24 AM Joseph Cobhams @.***> wrote:

Thanks for the catch. Open a PR?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jcobhams/newsapi-php/issues/2#issuecomment-908745947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFYAKCI2VSHQ3A6TPXHDELT7QAITANCNFSM5DB4SVQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jcobhams commented 2 years ago

I'll fix once I have some time