Skip to content

[pull] master from php:master#674

Merged
pull[bot] merged 24 commits intoConnectionMaster:masterfrom
php:master
Apr 13, 2026
Merged

[pull] master from php:master#674
pull[bot] merged 24 commits intoConnectionMaster:masterfrom
php:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 13, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

macoaure and others added 11 commits April 13, 2026 11:15
…ring self/parent/static deprecations (#21712)

When resolving string callables using self::, parent::, or static::,
zend_is_callable_check_class() emits E_DEPRECATED. If the user error
handler throws, EG(exception) is set but the function could still
return true, leading to trampoline allocation and a failed assertion
in shutdown_executor().

Return false from zend_is_callable_check_class() when EG(exception)
is set after handling.
* PHP-8.4:
  Fix-up NEWS
  Fix GH-21699: callable resolution must fail if error handler threw during self/parent/static deprecations (#21712)
* PHP-8.5:
  Fix-up NEWS
  Fix GH-21699: callable resolution must fail if error handler threw during self/parent/static deprecations (#21712)
…#21679)

* Fix GH-8562: SplFileObject::current() returns wrong value after next()

SplFileObject::next() without READ_AHEAD cleared the cached line and
incremented current_line_num but didn't advance the stream. When called
without a preceding current() (e.g. rewind() then next()), the stream
position stayed put, so the subsequent current() read stale data.

Read a line to advance the stream when next() is called with no cached
line.

Closes GH-8562

* Fix GH-8561: SplFileObject key()/current() desync after fgets()

fgets() read a line into the cache and incremented the line counter,
but left the cached line in place. The subsequent current() returned
the stale cached value instead of reading the next line from the
stream's actual position.

Clear the cached line after fgets() copies it to the return value.
This forces current() to re-read from the stream, which has already
advanced past the fgets'd line.

Closes GH-8561

* Fix GH-8563, GH-8564: SplFileObject EOF handling for seek() and next()

spl_filesystem_file_read_ex() treated a NULL buffer from
php_stream_get_line as a successful read of an empty line, creating a
phantom cached line at EOF. This caused seek() to give inconsistent
results between SplFileObject and SplTempFileObject (GH-8563), and
next() to increment the line counter indefinitely past EOF (GH-8564).

Return FAILURE when php_stream_get_line returns NULL, matching the
behavior of the existing php_stream_eof check. In seek(), break out
of the loop on EOF instead of returning, so the post-loop cleanup
runs consistently. In next(), return early at EOF without incrementing.
Make __toString() return empty string at EOF instead of throwing.

Closes GH-8563
Closes GH-8564

* Refine fgets() to reuse cached line when present

When current() reads a line into the cache without advancing line_num,
a subsequent fgets() would re-read the stream and return the next line,
skipping the cached one and leaving key() out of sync with current()
for the rest of the iteration.

Use the cached line if present; otherwise read a fresh line. Either way,
advance line_num by one.
* PHP-8.4:
  Add date.timezone=UTC to the INI overwrites in run-tests.php
* PHP-8.5:
  Add date.timezone=UTC to the INI overwrites in run-tests.php
@pull pull Bot locked and limited conversation to collaborators Apr 13, 2026
@pull pull Bot added the ⤵️ pull label Apr 13, 2026
NattyNarwhal and others added 13 commits April 13, 2026 13:44
…21652)

A buggy driver could do this and get PDO_ODBC stuck in this loop.
Require a non-empty string, so an empty one breaks like the SQL_NO_DATA
case.

Fixes GH-21534
* PHP-8.4:
  ext/pdo_odbc: Require non-empty string when building string buffer (#21652)
* PHP-8.5:
  ext/pdo_odbc: Require non-empty string when building string buffer (#21652)
odbc_fetch_row was changed to have $row be nullable and null by default
instead of using 0, but still accepted 0 due to old code being explicit. Use
ValueError for non-null $row < 1 instead.
* PHP-8.4:
  Add myself to DOM/XML/SOAP/SimpleXML/XMLReader/Writer and XSL.
* PHP-8.5:
  Add myself to DOM/XML/SOAP/SimpleXML/XMLReader/Writer and XSL.
rather than ZEND_COLD zend_never_inline to align the coding style with the rest of the file
Those are never used outside of zend_execute.c so no reason to export them in a header
…zend_never_inline

For consistency with other functions
@pull pull Bot merged commit d648cc1 into ConnectionMaster:master Apr 13, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants