Skip to content

Commit aa57e92

Browse files
kakserpomclaude
andcommitted
fix(tests): pass variable instead of literal null to reference parameter
PHP does not allow passing literal null to functions expecting reference parameters. Use a variable instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a66b8a6 commit aa57e92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/src/integration/array/array.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,5 @@
9292
assert(test_optional_array_mut_ref($mut_arr) === 3, 'Option<&mut ZendHashTable> should accept variable array and add element');
9393
assert(array_key_exists('added_by_rust', $mut_arr), 'Rust should have added a key to the array');
9494
assert($mut_arr['added_by_rust'] === 'value', 'Added value should be correct');
95-
assert(test_optional_array_mut_ref(null) === -1, 'Option<&mut ZendHashTable> should accept null');
95+
$null_arr = null;
96+
assert(test_optional_array_mut_ref($null_arr) === -1, 'Option<&mut ZendHashTable> should accept null');

0 commit comments

Comments
 (0)