Skip to content

Commit 6b25134

Browse files
westonrutermukeshpanchal27
authored andcommitted
Use static closure
Co-authored-by: Mukesh Panchal <[email protected]>
1 parent 0cd0d3a commit 6b25134

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/phpunit/tests/rest-api/rest-attachments-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3118,7 +3118,7 @@ public function test_edit_image_wp_slash_with_object_cast() {
31183118
// Mock wp_insert_attachment to capture the data being passed.
31193119
add_filter(
31203120
'wp_insert_attachment_data',
3121-
function ( $data ) use ( &$captured_data ) {
3121+
static function ( $data ) use ( &$captured_data ) {
31223122
$captured_data = $data;
31233123
return $data;
31243124
},

0 commit comments

Comments
 (0)