We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15b54d3 commit 04cf380Copy full SHA for 04cf380
src/FastJsonPatch.php
@@ -141,15 +141,13 @@ public function apply(string $patch): void
141
$revertPatch[] = $Operation->getRevertPatch($p);
142
}
143
} catch (FastJsonPatchException $e) {
144
- // restore the original document
145
foreach (array_reverse($revertPatch) as $p) {
146
if (!is_null($p)) {
147
$p = (object) $p;
148
$this->operations[$p->op]->apply($this->document, $p);
149
150
151
152
- // validation errors with the patch itself
153
if ($e instanceof FastJsonPatchValidationException) {
154
$i = count($revertPatch);
155
throw new InvalidPatchException(
0 commit comments