Skip to content

Commit

Permalink
Fix addcslashes(), strpos(): Passing null to parameter #1 ($string) o…
Browse files Browse the repository at this point in the history
…f type string is deprecated (#616)

Summary:
`Deprecated: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated {"exception":"[object] (ErrorException(code: 0): Deprecated: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated at /app/vendor/facebook/php-business-sdk/src/FacebookAds/Logger/CurlLogger.php:160)"} []

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated {"exception":"[object] (ErrorException(code: 0): Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated at /app/vendor/facebook/php-business-sdk/src/FacebookAds/Logger/CurlLogger.php:161)"} []`

Pull Request resolved: #616

Reviewed By: liliarizona

Differential Revision: D67467808

Pulled By: stcheng

fbshipit-source-id: 39b7f5e24b5b0314fcbaa271169c5c23b3b2afe0
  • Loading branch information
mbvb1223 authored and facebook-github-bot committed Dec 20, 2024
1 parent 95e5180 commit ef5a6d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/FacebookAds/Logger/CurlLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ protected function processParams(Parameters $params, $method, $is_file) {
if ($is_file && $params->offsetGet($name) instanceof FileParameter) {
$value = "@" . $this->normalizeFileParam($params->offsetGet($name));
} else {
$value = (string) $value;
$value = addcslashes(
strpos($value, "\n") !== false
? $this->indent($value, 2)
Expand Down

0 comments on commit ef5a6d9

Please sign in to comment.