Repository navigation
Strip nulls from simplified objects - #17
Merged
Merged
Conversation
The current code was allowing through null objects in the $data property, and also had an insufficiently strict condition in the properties, which would have filtered out false variables. It is possible that this change may need to be tweaked, but I think it covers the primary cases.
silvolu
added a commit
that referenced
this pull request
Dec 16, 2013
Strip nulls from simplified objects
bshaffer
pushed a commit
to bshaffer/google-api-php-client
that referenced
this pull request
Mar 2, 2016
…structure clean up package structure, remove JustAuth/
mp30028
added a commit
to mp30028/google-api-php-client
that referenced
this pull request
Mar 17, 2023
``` [Fri Mar 17 20:23:17.946922 2023] [php:error] [pid 1703] [client 172.17.0.1:53962] PHP Fatal error: Uncaught RuntimeException: Unable to read from stream in /var/www/html/vendor/guzzlehttp/psr7/src/Stream.php:237 Stack trace: #0 /var/www/html/vendor/guzzlehttp/psr7/src/Utils.php(53): GuzzleHttp\\Psr7\\Stream->read() googleapis#1 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php(210): GuzzleHttp\\Psr7\\Utils::copyToStream() googleapis#2 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php(140): GuzzleHttp\\Handler\\StreamHandler->drain() googleapis#3 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php(56): GuzzleHttp\\Handler\\StreamHandler->createResponse() googleapis#4 /var/www/html/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(35): GuzzleHttp\\Handler\\StreamHandler->__invoke() googleapis#5 /var/www/html/vendor/guzzlehttp/guzzle/src/Middleware.php(31): GuzzleHttp\\PrepareBodyMiddleware->__invoke() googleapis#6 /var/www/html/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(71): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}() googleapis#7 /var/www/html/vendor/guzzlehttp/guzzle/src/Middleware.php(61): GuzzleHttp\\RedirectMiddleware->__invoke() googleapis#8 /var/www/html/vendor/guzzlehttp/guzzle/src/HandlerStack.php(75): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}() googleapis#9 /var/www/html/vendor/guzzlehttp/guzzle/src/Client.php(331): GuzzleHttp\\HandlerStack->__invoke() googleapis#10 /var/www/html/vendor/guzzlehttp/guzzle/src/Client.php(168): GuzzleHttp\\Client->transfer() googleapis#11 /var/www/html/vendor/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\\Client->requestAsync() googleapis#12 /var/www/html/vendor/guzzlehttp/guzzle/src/ClientTrait.php(44): GuzzleHttp\\Client->request() googleapis#13 /var/www/html/vendor/google/apiclient/src/AccessToken/Verify.php(173): GuzzleHttp\\Client->get() googleapis#14 /var/www/html/vendor/google/apiclient/src/AccessToken/Verify.php(201): Google\\AccessToken\\Verify->retrieveCertsFromLocation() googleapis#15 /var/www/html/vendor/google/apiclient/src/AccessToken/Verify.php(105): Google\\AccessToken\\Verify->getFederatedSignOnCerts() googleapis#16 /var/www/html/vendor/google/apiclient/src/Client.php(815): Google\\AccessToken\\Verify->verifyIdToken() googleapis#17 /var/www/html/tryout-google-auth/web/idtoken.php(179): Google\\Client->verifyIdToken() googleapis#18 {main} Next GuzzleHttp\\Exception\\RequestException: Unable to read from stream in /var/www/html/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:52 Stack trace: #0 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php(74): GuzzleHttp\\Exception\\RequestException::wrapException() googleapis#1 /var/www/html/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(35): GuzzleHttp\\Handler\\StreamHandler->__invoke() googleapis#2 /var/www/html/vendor/guzzlehttp/guzzle/src/Middleware.php(31): GuzzleHttp\\PrepareBodyMiddleware->__invoke() googleapis#3 /var/www/html/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(71): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}() googleapis#4 /var/www/html/vendor/guzzlehttp/guzzle/src/Middleware.php(61): GuzzleHttp\\RedirectMiddleware->__invoke() googleapis#5 /var/www/html/vendor/guzzlehttp/guzzle/src/HandlerStack.php(75): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}() googleapis#6 /var/www/html/vendor/guzzlehttp/guzzle/src/Client.php(331): GuzzleHttp\\HandlerStack->__invoke() googleapis#7 /var/www/html/vendor/guzzlehttp/guzzle/src/Client.php(168): GuzzleHttp\\Client->transfer() googleapis#8 /var/www/html/vendor/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\\Client->requestAsync() googleapis#9 /var/www/html/vendor/guzzlehttp/guzzle/src/ClientTrait.php(44): GuzzleHttp\\Client->request() googleapis#10 /var/www/html/vendor/google/apiclient/src/AccessToken/Verify.php(173): GuzzleHttp\\Client->get() googleapis#11 /var/www/html/vendor/google/apiclient/src/AccessToken/Verify.php(201): Google\\AccessToken\\Verify->retrieveCertsFromLocation() googleapis#12 /var/www/html/vendor/google/apiclient/src/AccessToken/Verify.php(105): Google\\AccessToken\\Verify->getFederatedSignOnCerts() googleapis#13 /var/www/html/vendor/google/apiclient/src/Client.php(815): Google\\AccessToken\\Verify->verifyIdToken() googleapis#14 /var/www/html/tryout-google-auth/web/idtoken.php(179): Google\\Client->verifyIdToken() googleapis#15 {main} thrown in /var/www/html/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 52 ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current code was allowing through null objects in the $data property,
and also had an insufficiently strict condition in the properties, which
would have filtered out false variables. It is possible that this change
may need to be tweaked, but I think it covers the primary cases.