facebook / facebook-php-business-sdk

PHP SDK for Meta Marketing API
https://developers.facebook.com/docs/business-sdk
Other
816 stars 514 forks source link

Adding default state to exception status code #581

Closed MartinTebenko closed 1 year ago

MartinTebenko commented 1 year ago

Issue Title: Passing null to parameter #2 ($code) of type int is deprecated Issue Description: Problem location -> "facebook/php-business-sdk/src/FacebookAds/Http/Exception/RequestException.php(90): Tracy\DevelopmentStrategy::handleError" Exception -> Passing null to parameter #2 ($code) of type int is deprecated

Debugging Data: Kernel version -> Linux klarka9.stable.cz 3.10.0-1160.66.1.el7.x86_64 #1 SMP Wed May 18 16:02:34 UTC 2022 x86_64 Runtime -> PHP 8.1.18

Stack Trace -> [ErrorException: Exception::__construct(): Passing null to parameter #2 ($code) of type int is deprecated x27 /vendor/facebook/php-business-sdk/src/FacebookAds/Http/Exception/RequestException.php(90): Tracy\DevelopmentStrategy::handleError x26 /vendor/tracy/tracy/src/Tracy/Debugger/Debugger.php(358): Tracy\Debugger::errorHandler x25 internal: call_user_func_array x24 /vendor/facebook/php-business-sdk/src/FacebookAds/CrashReporter.php(154): FacebookAds\CrashReporter::FacebookAds{closure} x23 internal: Exception::construct x22 /vendor/facebook/php-business-sdk/src/FacebookAds/Http/Exception/RequestException.php(90): FacebookAds\Http\Exception\RequestException::construct x21 /vendor/facebook/php-business-sdk/src/FacebookAds/Http/Exception/EmptyResponseException.php(40): FacebookAds\Http\Exception\EmptyResponseException::__construct x20 /vendor/facebook/php-business-sdk/src/FacebookAds/Http/Client.php(220): FacebookAds\Http\Client::sendRequest x19 /vendor/facebook/php-business-sdk/src/FacebookAds/Http/Request.php(286): FacebookAds\Http\Request::execute x18 /vendor/facebook/php-business-sdk/src/FacebookAds/Api.php(165): FacebookAds\Api::executeRequest x17 /vendor/facebook/php-business-sdk/src/FacebookAds/Api.php(214): FacebookAds\Api::call x16 /vendor/facebook/php-business-sdk/src/FacebookAds/ApiRequest.php(187): FacebookAds\ApiRequest::execute]

facebook-github-bot commented 1 year ago

Hi @MartinTebenko!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

facebook-github-bot commented 1 year ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

facebook-github-bot commented 1 year ago

@stcheng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 year ago

@stcheng merged this pull request in facebook/facebook-php-business-sdk@df67b5bb9f713a29f184c433eff38bec7d78002e.