Skip to content

Commit 9499a6c

Browse files
[12.x] Fix/memory improvement (#56345)
* wip * fix failling test * Update CompilesComponents.php * Update BladePropsTest.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 58ea471 commit 9499a6c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Illuminate/View/Compilers/Concerns/CompilesComponents.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ protected function compileProps($expression)
185185
if (array_key_exists(\$__key, \$__defined_vars)) unset(\$\$__key);
186186
}
187187
188-
unset(\$__defined_vars); ?>";
188+
unset(\$__defined_vars, \$__key, \$__value); ?>";
189189
}
190190

191191
/**

tests/View/Blade/BladePropsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testPropsAreCompiled()
3636
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
3737
}
3838
39-
unset($__defined_vars); ?>', $this->compiler->compileString('@props([\'one\' => true, \'two\' => \'string\'])'));
39+
unset($__defined_vars, $__key, $__value); ?>', $this->compiler->compileString('@props([\'one\' => true, \'two\' => \'string\'])'));
4040
}
4141

4242
public function testPropsAreExtractedFromParentAttributesCorrectly()

0 commit comments

Comments
 (0)