Skip to content

Commit 251042b

Browse files
committed
Avoid casting objects to string
1 parent 9404019 commit 251042b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/WP_CLI/SearchReplacer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ private function run_recursively( $data, $serialised, $recursion_level = 0, $vis
127127
} catch ( \Error $exception ) { // phpcs:ignore PHPCompatibility.Classes.NewClasses.errorFound
128128
\WP_CLI::warning(
129129
sprintf(
130-
'Skipping an inconvertible serialized object: "%s", replacements might not be complete. Reason: %s.',
131-
$data,
130+
'Skipping an inconvertible serialized object of type "%s", replacements might not be complete. Reason: %s.',
131+
is_object( $data ) ? get_class( $data ) : gettype( $data ),
132132
$exception->getMessage()
133133
)
134134
);

0 commit comments

Comments
 (0)