PHP 8.5: Fix "Using null as an array offset" deprecations#949
Merged
jtojnar merged 3 commits intosimplepie:masterfrom Oct 1, 2025
Merged
PHP 8.5: Fix "Using null as an array offset" deprecations#949jtojnar merged 3 commits intosimplepie:masterfrom
jtojnar merged 3 commits intosimplepie:masterfrom
Conversation
jtojnar
reviewed
Sep 29, 2025
Member
jtojnar
left a comment
There was a problem hiding this comment.
Thanks for the fix. Confirmed that this is indeed a problem with php-src master:
<?php
$foo = [];
$scheme = null;
var_dump(isset($foo[$scheme]));
// Deprecated: Using null as an array offset is deprecated, use an empty string instead in /in/Udd6D on line 6
// bool(false)| } | ||
|
|
||
| if ($return === null && isset($this->normalization[$this->scheme][$name])) { | ||
| if ($return === null && isset($this->scheme, $this->normalization[$this->scheme][$name])) { |
Member
There was a problem hiding this comment.
Looks like multiple arguments were supported at least in PHP 5. TIL.
Art4
approved these changes
Oct 1, 2025
Member
|
Thank you. |
Contributor
Author
|
Thank you for merging this :-) Is there an ETA for the next release by any chance? This change here is the last blocker for tests to pass in WordPress on PHP 8.5. |
pento
pushed a commit
to WordPress/wordpress-develop
that referenced
this pull request
Oct 16, 2025
After the update to v1.9.0 in [60771], this merges a single bug fix, in absence of a new upstream release in time for 6.9 Beta. References: * [simplepie/simplepie#949 Original upstream PR] Props swissspidy. Fixes #63961. git-svn-id: https://develop.svn.wordpress.org/trunk@60947 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith
pushed a commit
to markjaquith/WordPress
that referenced
this pull request
Oct 16, 2025
After the update to v1.9.0 in [60771], this merges a single bug fix, in absence of a new upstream release in time for 6.9 Beta. References: * [simplepie/simplepie#949 Original upstream PR] Props swissspidy. Fixes #63961. Built from https://develop.svn.wordpress.org/trunk@60947 git-svn-id: http://core.svn.wordpress.org/trunk@60283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot
pushed a commit
to platformsh/wordpress-performance
that referenced
this pull request
Oct 16, 2025
After the update to v1.9.0 in [60771], this merges a single bug fix, in absence of a new upstream release in time for 6.9 Beta. References: * [simplepie/simplepie#949 Original upstream PR] Props swissspidy. Fixes #63961. Built from https://develop.svn.wordpress.org/trunk@60947 git-svn-id: https://core.svn.wordpress.org/trunk@60283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
mattyrob
pushed a commit
to ClassicPress/ClassicPress
that referenced
this pull request
Dec 3, 2025
…mplePie. After the update to v1.9.0 in https://core.trac.wordpress.org/changeset/60771, this merges a single bug fix, in absence of a new upstream release in time for 6.9 Beta. References: * [simplepie/simplepie#949 Original upstream PR] WP:Props swissspidy. Fixes https://core.trac.wordpress.org/ticket/63961. --- Merges https://core.trac.wordpress.org/changeset/60947 / WordPress/wordpress-develop@330deca538 to ClassicPress.
mattyrob
added a commit
to ClassicPress/ClassicPress
that referenced
this pull request
Jan 7, 2026
* WP-r59382: Feeds: Avoid fatal error with empty `blog_charset` value. After the SimplePie library was updated to version `1.8.0` in https://core.trac.wordpress.org/changeset/59141, an edge case has been discovered where a fatal error can encountered if the `blog_charset` option is missing or empty. In `fetch_feed()`, this option is retrieved using `get_option()` instead of `get_bloginfo( ‘charset’ )`. The latter will detect this scenario and apply a default value of `UTF-8` and is already used interchangeably throughout Core. This switches to `get_bloginfo( ‘charset’ )` instead to prevent this edge case. WP:Props david.binda, davidbaumwald, SergeyBiryukov, sabernhardt, azaozz, peterwilsoncc. Fixes https://core.trac.wordpress.org/ticket/62354. --- Merges https://core.trac.wordpress.org/changeset/59382 / WordPress/wordpress-develop@2762e5e92b to ClassicPress. * Add WordPress.org news feed XML for tests Introduced a new test data file containing the WordPress.org news RSS feed in XML format for use in PHPUnit tests. * WP-r59408: Tests: Add missing `@covers` tag for `fetch_feed()` tests. Includes correcting the test class name as per the naming conventions. Follow-up to https://core.trac.wordpress.org/changeset/59382. See https://core.trac.wordpress.org/ticket/62280. --- Merges https://core.trac.wordpress.org/changeset/59408 / WordPress/wordpress-develop@a731b9bfc0 to ClassicPress. * WP-r60490: External Libraries: Upgrade Simple Pie to 1.8.1 (patched). Upgrades the Simple Pie library to a patched version of [https://github.com/simplepie/simplepie/releases/tag/1.8.1 Simple Pie 1.8.1]. Much of 1.8.1 was included in the 1.8.0 upgrade committed in r59141. The following fixes from the latest release those that remain for this upgrade: * Fix locator with website missing `Content-Type` header [simplepie/simplepie#891 simplepie/simplepiehttps://core.trac.wordpress.org/ticket/891] * Fix `encode` argument of `SimplePie::strip_htmltags()` [simplepie/simplepie#894 simplepie/simplepiehttps://core.trac.wordpress.org/ticket/894] A caching fix not included in Simple Pie 1.8.1 is also included in this upgrade, see [simplepie/simplepie#883 simplepie/simplepiehttps://core.trac.wordpress.org/ticket/883]. A caching test for `fetch_feed()` is introduced in this pull request to ensure that the caching patch is included in future upgrades of the library. WP:Props kaygee79, oglekler, SergeyBiryukov, peterwilsoncc. Fixes https://core.trac.wordpress.org/ticket/63717. --- Merges https://core.trac.wordpress.org/changeset/60490 / WordPress/wordpress-develop@f0a3c68f9e to ClassicPress. * WP-r60771: External Libraries: Update the SimplePie library to version 1.9.0. References: * [https://github.com/simplepie/simplepie/releases/tag/1.9.0 SimplePie 1.9.0 release notes] * [simplepie/simplepie@1.8.1...1.9.0 Full list of changes in SimplePie 1.9.0] Follow-up to https://core.trac.wordpress.org/changeset/59141, https://core.trac.wordpress.org/changeset/60490. WP:Props swissspidy, TobiasBg, SergeyBiryukov. Fixes https://core.trac.wordpress.org/ticket/63961. Conflicts: - src/wp-includes/feed.php --- Merges https://core.trac.wordpress.org/changeset/60771 / WordPress/wordpress-develop@2553772fb0 to ClassicPress. * Remove merge conflict markers in feed.php Cleaned up leftover merge conflict markers and redundant code in fetch_feed function to ensure proper sanitization class is set for SimplePie. * WP-r60947: External Libraries: Backport upstream PHP 8.5 fixes for SimplePie. After the update to v1.9.0 in https://core.trac.wordpress.org/changeset/60771, this merges a single bug fix, in absence of a new upstream release in time for 6.9 Beta. References: * [simplepie/simplepie#949 Original upstream PR] WP:Props swissspidy. Fixes https://core.trac.wordpress.org/ticket/63961. --- Merges https://core.trac.wordpress.org/changeset/60947 / WordPress/wordpress-develop@330deca538 to ClassicPress. * Add removed SimplePie files to old files list Added 'wp-includes/SimplePie/src/Decode' and 'wp-includes/SimplePie/src/Core.php' to the $_old_files array to support the upgrade to SimplePie 1.9.0. * Update git conflict regex for 7 angled brackets --------- Co-authored-by: Jonathan Desrosiers <desrosj@git.wordpress.org> Co-authored-by: Sergey Biryukov <sergeybiryukov@git.wordpress.org> Co-authored-by: Peter Wilson <peterwilsoncc@git.wordpress.org> Co-authored-by: Pascal Birchler <swissspidy@git.wordpress.org> CP:Props mattyrob, xxsimoxx
pento
pushed a commit
to WordPress/wordpress-develop
that referenced
this pull request
Jan 28, 2026
In [simplepie/simplepie#795 simplepie/simplepie#795] handling of multiple feed requests was deprecated, triggering the message `Fetching multiple feeds with single SimplePie instance is deprecated since SimplePie 1.9.0, create one SimplePie instance per feed and use SimplePie::merge_items to get a single list of items.` This updates `fetch_feed()` to handle multiple requests using seperate SimplePie instances in order to retain backward compatibility. A PHP 8.5 deprecation was throwing notices in the event an empty URL was passed to `fetch_feed()`, `Using null as an array offset is deprecated, use an empty string instead`. This includes a workaround pending the release of a SimplePie version including [simplepie/simplepie#949 simplepie/simplepie#949]. Fixes #64136. Props audrasjb, jorbin, muryam, oglekler, ozgursar, presskopp, swissspidy, westonruter, wildworks, peterwilsoncc. git-svn-id: https://develop.svn.wordpress.org/trunk@61551 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith
pushed a commit
to markjaquith/WordPress
that referenced
this pull request
Jan 28, 2026
In [simplepie/simplepie#795 simplepie/simplepie#795] handling of multiple feed requests was deprecated, triggering the message `Fetching multiple feeds with single SimplePie instance is deprecated since SimplePie 1.9.0, create one SimplePie instance per feed and use SimplePie::merge_items to get a single list of items.` This updates `fetch_feed()` to handle multiple requests using seperate SimplePie instances in order to retain backward compatibility. A PHP 8.5 deprecation was throwing notices in the event an empty URL was passed to `fetch_feed()`, `Using null as an array offset is deprecated, use an empty string instead`. This includes a workaround pending the release of a SimplePie version including [simplepie/simplepie#949 simplepie/simplepie#949]. Fixes #64136. Props audrasjb, jorbin, muryam, oglekler, ozgursar, presskopp, swissspidy, westonruter, wildworks, peterwilsoncc. Built from https://develop.svn.wordpress.org/trunk@61551 git-svn-id: http://core.svn.wordpress.org/trunk@60862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento
pushed a commit
to WordPress/wordpress-develop
that referenced
this pull request
Jan 29, 2026
In [simplepie/simplepie#795 simplepie/simplepie#795] handling of multiple feed requests was deprecated, triggering the message `Fetching multiple feeds with single SimplePie instance is deprecated since SimplePie 1.9.0, create one SimplePie instance per feed and use SimplePie::merge_items to get a single list of items.` This updates `fetch_feed()` to handle multiple requests using seperate SimplePie instances in order to retain backward compatibility. A PHP 8.5 deprecation was throwing notices in the event an empty URL was passed to `fetch_feed()`, `Using null as an array offset is deprecated, use an empty string instead`. This includes a workaround pending the release of a SimplePie version including [simplepie/simplepie#949 simplepie/simplepie#949]. Reviewed by jorbin. Merges [61551] to the 6.9 branch. Fixes #64136. Props audrasjb, jorbin, muryam, oglekler, ozgursar, presskopp, swissspidy, westonruter, wildworks, peterwilsoncc. git-svn-id: https://develop.svn.wordpress.org/branches/6.9@61553 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith
pushed a commit
to markjaquith/WordPress
that referenced
this pull request
Jan 29, 2026
In [simplepie/simplepie#795 simplepie/simplepie#795] handling of multiple feed requests was deprecated, triggering the message `Fetching multiple feeds with single SimplePie instance is deprecated since SimplePie 1.9.0, create one SimplePie instance per feed and use SimplePie::merge_items to get a single list of items.` This updates `fetch_feed()` to handle multiple requests using seperate SimplePie instances in order to retain backward compatibility. A PHP 8.5 deprecation was throwing notices in the event an empty URL was passed to `fetch_feed()`, `Using null as an array offset is deprecated, use an empty string instead`. This includes a workaround pending the release of a SimplePie version including [simplepie/simplepie#949 simplepie/simplepie#949]. Reviewed by jorbin. Merges [61551] to the 6.9 branch. Fixes #64136. Props audrasjb, jorbin, muryam, oglekler, ozgursar, presskopp, swissspidy, westonruter, wildworks, peterwilsoncc. Built from https://develop.svn.wordpress.org/branches/6.9@61553 git-svn-id: http://core.svn.wordpress.org/branches/6.9@60864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
mattyrob
pushed a commit
to ClassicPress/ClassicPress
that referenced
this pull request
Jan 29, 2026
In [simplepie/simplepie#795 simplepie/simplepiehttps://core.trac.wordpress.org/ticket/795] handling of multiple feed requests was deprecated, triggering the message `Fetching multiple feeds with single SimplePie instance is deprecated since SimplePie 1.9.0, create one SimplePie instance per feed and use SimplePie::merge_items to get a single list of items.` This updates `fetch_feed()` to handle multiple requests using seperate SimplePie instances in order to retain backward compatibility. A PHP 8.5 deprecation was throwing notices in the event an empty URL was passed to `fetch_feed()`, `Using null as an array offset is deprecated, use an empty string instead`. This includes a workaround pending the release of a SimplePie version including [simplepie/simplepie#949 simplepie/simplepiehttps://core.trac.wordpress.org/ticket/949]. Fixes https://core.trac.wordpress.org/ticket/64136. WP:Props audrasjb, jorbin, muryam, oglekler, ozgursar, presskopp, swissspidy, westonruter, wildworks, peterwilsoncc. --- Merges https://core.trac.wordpress.org/changeset/61551 / WordPress/wordpress-develop@779509ffc8 to ClassicPress.
mattyrob
added a commit
to ClassicPress/ClassicPress
that referenced
this pull request
Feb 4, 2026
* WP-r61551: Feeds: Fix backward compatibility of `fetch_feed()`. In [simplepie/simplepie#795 simplepie/simplepiehttps://core.trac.wordpress.org/ticket/795] handling of multiple feed requests was deprecated, triggering the message `Fetching multiple feeds with single SimplePie instance is deprecated since SimplePie 1.9.0, create one SimplePie instance per feed and use SimplePie::merge_items to get a single list of items.` This updates `fetch_feed()` to handle multiple requests using seperate SimplePie instances in order to retain backward compatibility. A PHP 8.5 deprecation was throwing notices in the event an empty URL was passed to `fetch_feed()`, `Using null as an array offset is deprecated, use an empty string instead`. This includes a workaround pending the release of a SimplePie version including [simplepie/simplepie#949 simplepie/simplepiehttps://core.trac.wordpress.org/ticket/949]. Fixes https://core.trac.wordpress.org/ticket/64136. WP:Props audrasjb, jorbin, muryam, oglekler, ozgursar, presskopp, swissspidy, westonruter, wildworks, peterwilsoncc. --- Merges https://core.trac.wordpress.org/changeset/61551 / WordPress/wordpress-develop@779509ffc8 to ClassicPress. * Use core PHPUnit assertion --------- Co-authored-by: Peter Wilson <peterwilsoncc@git.wordpress.org> CP:Props mattyrob, xxsimoxx
markjaquith
pushed a commit
to WordPress/WordPress
that referenced
this pull request
Feb 18, 2026
In [simplepie/simplepie#795 simplepie/simplepie#795] handling of multiple feed requests was deprecated, triggering the message `Fetching multiple feeds with single SimplePie instance is deprecated since SimplePie 1.9.0, create one SimplePie instance per feed and use SimplePie::merge_items to get a single list of items.` This updates `fetch_feed()` to handle multiple requests using seperate SimplePie instances in order to retain backward compatibility. A PHP 8.5 deprecation was throwing notices in the event an empty URL was passed to `fetch_feed()`, `Using null as an array offset is deprecated, use an empty string instead`. This includes a workaround pending the release of a SimplePie version including [simplepie/simplepie#949 simplepie/simplepie#949]. Fixes #64136. Props audrasjb, jorbin, muryam, oglekler, ozgursar, presskopp, swissspidy, westonruter, wildworks, peterwilsoncc. Built from https://develop.svn.wordpress.org/trunk@61551 git-svn-id: http://core.svn.wordpress.org/trunk@60862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a new deprecation in PHP 8.5. See https://wiki.php.net/rfc/deprecations_php_8_5 / php/php-src@49e3956