mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
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.
24 lines
414 B
PHP
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)
|