-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GH-9698: stream_wrapper_register crashes with FFI\CData provided …
…as class Closes GH-12926
- Loading branch information
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--TEST-- | ||
GH-9698 (stream_wrapper_register crashes with FFI\CData provided as class) | ||
--EXTENSIONS-- | ||
ffi | ||
--SKIPIF-- | ||
<?php | ||
?> | ||
--FILE-- | ||
<?php | ||
try { | ||
stream_wrapper_register('badffi', 'FFI\CData'); | ||
file_get_contents('badffi://x'); | ||
} catch (Throwable $exception) { | ||
echo $exception->getMessage(); | ||
} | ||
?> | ||
|
||
DONE | ||
--EXPECT-- | ||
Attempt to assign field 'context' to uninitialized FFI\CData object | ||
DONE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters