Skip to content

Commit 4509c7d

Browse files
committed
Add another clarifying comment
1 parent 586522b commit 4509c7d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/WP_CLI/SearchReplacer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ private function run_recursively( $data, $serialised, $recursion_level = 0, $vis
129129
$data->$key = $this->run_recursively( $value, false, $recursion_level + 1, $visited_data );
130130
}
131131
} catch ( \Error $exception ) { // phpcs:ignore PHPCompatibility.Classes.NewClasses.errorFound
132+
// This error is thrown when the object that was unserialized cannot be iterated upon.
133+
// The most notable reason is an empty `mysqli_result` object which is then considered to be "already closed".
134+
// See https://github.com/wp-cli/search-replace-command/pull/192#discussion_r1412310179
132135
\WP_CLI::warning(
133136
sprintf(
134137
'Skipping an inconvertible serialized object of type "%s", replacements might not be complete. Reason: %s.',

0 commit comments

Comments
 (0)