1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/ffi/tests/gh14215.phpt
Niels Dossche ebd1a36670 Fix GH-14215: Cannot use FFI::load on CRLF header file with apache2handler
Some modules may reset _fmode, which causes mangling of line endings.
Always be explicit like we do in other places where the native open call
is used.

Closes GH-14218.
2024-05-14 19:49:22 +02:00

24 lines
414 B
PHP

--TEST--
GH-14215 (Cannot use FFI::load on CRLF header file with apache2handler)
--EXTENSIONS--
ffi
zend_test
--SKIPIF--
<?php
if(PHP_OS_FAMILY !== "Windows") {
die('skip only for Windows');
}
?>
--INI--
ffi.enable=1
--FILE--
<?php
zend_test_set_fmode(false);
$header_path = __DIR__.'\\gh14215.h';
$ffi = FFI::load($header_path);
var_dump($ffi->GetLastError());
zend_test_set_fmode(true);
?>
--EXPECT--
int(0)