Skip to content

Commit ef5a6d9

Browse files
mbvb1223facebook-github-bot
authored andcommitted
Fix addcslashes(), strpos(): Passing null to parameter #1 ($string) of 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
1 parent 95e5180 commit ef5a6d9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/FacebookAds/Logger/CurlLogger.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ protected function processParams(Parameters $params, $method, $is_file) {
157157
if ($is_file && $params->offsetGet($name) instanceof FileParameter) {
158158
$value = "@" . $this->normalizeFileParam($params->offsetGet($name));
159159
} else {
160+
$value = (string) $value;
160161
$value = addcslashes(
161162
strpos($value, "\n") !== false
162163
? $this->indent($value, 2)

0 commit comments

Comments
 (0)