Skip to content

Commit 57cb6eb

Browse files
committed
converting obj to array to avoid errors with funky/blank objects on deserialization
1 parent f6e1a3e commit 57cb6eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WP_CLI/SearchReplacer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private function run_recursively( $data, $serialised, $recursion_level = 0, $vis
119119
)
120120
);
121121
} else {
122-
foreach ( $data as $key => $value ) {
122+
foreach ( (array) $data as $key => $value ) {
123123
$data->$key = $this->run_recursively( $value, false, $recursion_level + 1, $visited_data );
124124
}
125125
}

0 commit comments

Comments
 (0)