Skip to content

Commit 08eeaaf

Browse files
swissspidyclaude
andcommitted
Document that live objects in array input can still be partly modified
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx
1 parent 4c8da6c commit 08eeaaf

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/WP_CLI/SearchReplacer.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ public function __construct( $from, $to, $recurse_objects = false, $regex = fals
135135
*
136136
* With key recursion enabled, the replacement is all or nothing: if
137137
* renaming the keys or property names of any object in $data fails, the
138-
* original $data is returned unchanged, and no log entries are kept for it.
138+
* original $data is returned and no log entries are kept for it. For a
139+
* serialized string (which is all the command passes) that means the value
140+
* is left unchanged. For an array holding live objects, those objects may
141+
* still have been partly modified in place.
139142
*
140143
* @param array|string $data The data to operate on.
141144
* @param bool $serialised Does the value of $data need to be unserialized?

0 commit comments

Comments
 (0)