Skip to content

Commit

Permalink
converting obj to array to avoid errors with funky/blank objects on d…
Browse files Browse the repository at this point in the history
…eserialization
  • Loading branch information
MarkBerube committed Nov 29, 2023
1 parent f6e1a3e commit 57cb6eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WP_CLI/SearchReplacer.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private function run_recursively( $data, $serialised, $recursion_level = 0, $vis
)
);
} else {
foreach ( $data as $key => $value ) {
foreach ( (array) $data as $key => $value ) {
$data->$key = $this->run_recursively( $value, false, $recursion_level + 1, $visited_data );
}
}
Expand Down

0 comments on commit 57cb6eb

Please sign in to comment.