#59833 closed defect (bug) (invalid)
While we update wordpress version 6.4 getting php error
| Reported by: | ravimakwana68 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Upgrade/Install | Version: | 6.4 |
| Severity: | major | Keywords: | reporter-feedback close |
| Cc: | Focuses: |
Description
Hello, today we tried to update WordPress version 6.4 in PHP 7.4.33 version and got PHP error. The current WordPress version is not stable.
error details is: PHP Fatal error: Uncaught Error: Call to undefined function str_contains() in /public_html/wp-includes/load.php
Change History (7)
#2
@
3 years ago
While we existing website upgrading version from 6.2.2 to 6.4 getting website down.
#3
in reply to: ↑ 1
@
3 years ago
Replying to SergeyBiryukov:
Hi there, welcome to WordPress Trac! Thanks for the report.
This was previously brought up in #59113, but could not be reproduced yet. WordPress has a polyfill for
str_contains()inwp-includes/compat.php, and it should be loaded during the initialization process.
While we existing website upgrading version from 6.2.2 to 6.4 getting the website down.
#4
@
3 years ago
Hey @ravimakwana68, I couldn't replicate it as well. Not sure, but will adding a check like "wp_installing()" in the compat.php for the polyfill help in any case @SergeyBiryukov?
This ticket was mentioned in Slack in #core by jorbin. View the logs.
3 years ago
#6
@
3 years ago
- Keywords close added
Reproduction Report
Environment
- WordPress: 6.2.2 -> 6.4.1
- PHP: 7.3.33
- Server: Apache/2.4.57 (Unix) PHP/7.3.33
- Database: mysqli (Server: 5.7.43 / Client: Unavailable)
- Browser: Safari 17.1 (macOS)
- Theme: Twenty Twenty-Three
- MU-Plugins: None activated
Actual Results
- ❌ No error occurs.
Additional Notes
I cannot reproduce this issue with PHP 7.3.33 on a clean install of WordPress 6.2.2.
#7
@
3 years ago
- Milestone Awaiting Review
- Resolution → invalid
- Status new → closed
Cannot reproduce either. Seems this is an one-off error that may have been caused by a failed or partial update. There doesn't seem to be a possibility for the polyfill to be missing as compat.php (where the polifills are) is always required before everything else including load.php. See: https://core.trac.wordpress.org/browser/trunk/src/wp-settings.php#L33.
Closing as invalid. Please feel free to reopen with more info on how to reliably reproduce this.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi there, welcome to WordPress Trac! Thanks for the report.
This was previously brought up in #59113, but could not be reproduced yet. WordPress has a polyfill for
str_contains()inwp-includes/compat.php, and it should be loaded during the initialization process.wp-settings.phpfile hascompat.phpon line 34?