History log of /php-src/ext/standard/file.c (Results 1 – 25 of 797)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 41e3044f 09-Feb-2024 Peter Kokot

Remove obsolete check for missing fclose declaration (#13360)

SunOS 4.1.4 from 1994 didn't have fclose declared in standard header
stdio.h. This doesn't need to be checked anymore, as fc

Remove obsolete check for missing fclose declaration (#13360)

SunOS 4.1.4 from 1994 didn't have fclose declared in standard header
stdio.h. This doesn't need to be checked anymore, as fclose is part of
the C89+ standard and declaration is present on Solaris 10 (SunOS 5.10)
and later.

show more ...


# 927adfb1 20-Dec-2023 Cristian Rodríguez

Use a single version of mempcpy(3) (#12257)

While __php_mempcpy is only used by ext/standard/crypt_sha*, the
mempcpy "pattern" is used everywhere.

This commit removes __php_memp

Use a single version of mempcpy(3) (#12257)

While __php_mempcpy is only used by ext/standard/crypt_sha*, the
mempcpy "pattern" is used everywhere.

This commit removes __php_mempcpy, adds zend_mempcpy and transforms
open-coded parts into function calls.

show more ...


# 5e02bca5 11-Dec-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Remove always-true condition from php_copy_file_ctx()

srcstream is always checked before.


# 64ebadca 07-Sep-2023 Jakub Zelenka

Fix GH-12151: str_getcsv ending with escape zero segfualt

Closes GH-12152


# aff46d75 25-Aug-2023 Jakub Zelenka

Fix GH-11982: str_getcsv returns null byte for unterminated quoted string

Closes GH-12047


# cbfd7376 04-Aug-2023 Athos Ribeiro

Fix off-by-one bug when truncating tempnam prefix

The tempnam documentation currently states that "Only the first 63
characters of the prefix are used, the rest are ignored". However whe

Fix off-by-one bug when truncating tempnam prefix

The tempnam documentation currently states that "Only the first 63
characters of the prefix are used, the rest are ignored". However when
the prefix is 64 characters-long, the current implementation fails to
strip the last character, diverging from the documented behavior. This
patch fixes the implementation so it matches the documented behavior for
that specific case where the prefix is 64 characters long.

Closes GH-11870

Signed-off-by: George Peter Banyard <girgias@php.net>

show more ...


# 3b0e6195 19-Jun-2023 hanshenrik

fix file() flags error-check

the old flag check was flawed and would miss some flags, for example:
file(__FILE__, FILE_APPEND);
is invalid, but the old flags error check would miss i

fix file() flags error-check

the old flag check was flawed and would miss some flags, for example:
file(__FILE__, FILE_APPEND);
is invalid, but the old flags error check would miss it: https://3v4l.org/b2W9u

Closes GH-11483

show more ...


# 8bf2d587 28-Apr-2023 Ilija Tovilo

Propagate STREAM_DISABLE_OPEN_BASEDIR src flag to php_stream_stat_path_ex

Otherwise we can get open_basedir warnings from the stat call while still
performing the actual copy.

F

Propagate STREAM_DISABLE_OPEN_BASEDIR src flag to php_stream_stat_path_ex

Otherwise we can get open_basedir warnings from the stat call while still
performing the actual copy.

Fixes GH-11138
Closes GH-11156

show more ...


# 732d92c0 28-Apr-2023 Javier Eguiluz

[skip ci] Fix various typos and grammar issues (#11143)


# 57029ce9 24-Mar-2023 Ilija Tovilo

Fix buffer-overflow in php_fgetcsv() with \0 delimiter and enclosure

Fixes oss-fuzz #57392
Closes GH-10923


# 11b612af 07-Dec-2022 Niels <7771979+nielsdos@users.noreply.github.com>

Rename PHP_STREAM_TO_ZVAL to PHP_STREAM_FROM_ZVAL (#10065)


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23
# c573b822 26-Aug-2022 Máté Kocsis

Declare ext/standard constants in stubs - part 2 (#9426)

Revision tags: php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1
# 4ccf0b01 08-Jul-2022 George Peter Banyard

Make php_fgetcsv() return a HashTale instead of in-out zval param (#8936)

Also refactor what happens on an empty line to return NULL instead of setting the array to [NULL] which makes no des

Make php_fgetcsv() return a HashTale instead of in-out zval param (#8936)

Also refactor what happens on an empty line to return NULL instead of setting the array to [NULL] which makes no design sense at all.
However, as this is the current behaviour create a BC Shim inline function to recreate this weird HashTable in the functions which currently use this API

show more ...

Revision tags: php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28
# 6beee1a5 03-Feb-2022 Max Kellermann

Disable the read buffer in file_get_contents()

The read buffer is useless here, it only hurts performance.

Closes GH-8547.

Revision tags: php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1, php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1
# 5171cb43 20-May-2020 George Peter Banyard

Fix [-Wundef] warnings in standard extension

# 52e7e0f5 01-Oct-2021 Aliaksandr Bystry

Fix bug #66588: SplFileObject::fgetcsv incorrectly returns a row on premature EOF

Make sure the behavior is the same regardless of whether there is
a trailing newline and whether the inp

Fix bug #66588: SplFileObject::fgetcsv incorrectly returns a row on premature EOF

Make sure the behavior is the same regardless of whether there is
a trailing newline and whether the input is a stream or not.

Closes GH-7539.

show more ...

# c96be7b8 24-Sep-2021 Tim Starling

Use ASCII lower case for misc case folding

Use ASCII case conversion instead of locale-dependent case conversion in
the following places:

* grapheme_stripos() and grapheme_strri

Use ASCII lower case for misc case folding

Use ASCII case conversion instead of locale-dependent case conversion in
the following places:

* grapheme_stripos() and grapheme_strripos() in the "fast" path
* ldap_get_entries()
* oci_pconnect() for case folding of parameters when constructing a key
into the connection or session pool
* SoapClient: case folding of function names
* get_meta_tags(): case conversion of property names
* http stream wrapper: header names
* phpinfo(): anchor names
* php_verror(): docref URLs
* rfc1867.c: Content-Type boundary parameter name
* streams.c: stream protocol names

Using locale-dependent case folding for these cases is either
unnecessary or actively incorrect. These functions could have
misbehaved when used with certain locales (e.g. Turkish).

Closes GH-7511.

show more ...

# 14f599ea 31-Aug-2021 Nikita Popov

Use zend_long for resource ID

Currently, resource IDs are limited to 32-bits. As resource IDs
are not reused, this means that resource ID overflow for
long-running processes is very

Use zend_long for resource ID

Currently, resource IDs are limited to 32-bits. As resource IDs
are not reused, this means that resource ID overflow for
long-running processes is very possible.

This patch switches resource IDs to use zend_long instead, which
means that on 64-bit systems, 64-bit resource IDs will be used.
This makes resource ID overflow practically impossible.

The tradeoff is an 8 byte increase in zend_resource size.

Closes GH-7436.

show more ...

# 6e577114 25-Aug-2021 Ikko Ashimine

Fix typo in file.c

apostrohpe -> apostrophe

# 6e20f0f3 16-Aug-2021 Nikita Popov

Returned interned string from fgetc()

Make use of single-character interned strings.

# 232aa34b 08-Jul-2021 Nikita Popov

Deprecate auto_detect_line_endings

Part of https://wiki.php.net/rfc/deprecations_php_8_1.

# 92f6e215 08-Jul-2021 Nikita Popov

Deprecate FILE_BINARY and FILE_TEXT constants

These constants have no effect.

Part of https://wiki.php.net/rfc/deprecations_php_8_1.

# 076fbd36 06-Jul-2021 Nikita Popov

Minor fgetcsv cleanup

Reduce some variable scopes.

# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs

# aca6aefd 14-May-2021 George Peter Banyard

Remove 'register' type qualifier (#6980)

The compiler should be smart enough to optimize this on its own

12345678910>>...32