Opened 3 years ago
Closed 3 years ago
#57137 closed defect (bug) (invalid)
Upgrade to 6.1.1: Error in pluggable.php (function wp_rand)
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 6.1.1 |
| Component: | General | Keywords: | |
| Focuses: | Cc: |
Description (last modified by )
After upgrade a simple test WP to 6.1.1 some posts are not displayed and following error occures in pluggable.php in the body of function wp_rand:
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/wp/wp-includes/pluggable.php on line 2660
The line number vary between 2660 and 2662.
Here the relevant coding with line numbers:
2655 // Use PHP's CSPRNG, or a compatible method.
2656 static $use_random_int_functionality = true;
2657 if ( $use_random_int_functionality ) {
2658 try {
2659 // wp_rand() can accept arguments in either order, PHP cannot.
2660 $_max = max( $min, $max );
2661 $_min = min( $min, $max );
2662 $val = random_int( $_min, $_max );
2663 if ( false !== $val ) {
It doesn't help to increase the timeout.
All plugins are deactivated, the standard WP theme is used, WP is used in the network mode.
If the variable $use_random_int_functionality is set to false (line 2656) than the error doesn't occure but the post will not be rendered (inifitive processing)
Change History (6)
#1
@
3 years ago
- Description modified (diff)
- Keywords reporter-feedback added
- Milestone changed from Awaiting Review to 6.1.2
#2
@
3 years ago
Hello, thanks a lot for your answer.
Here the details of the platform:
Server architecture: Linux 5.10.0-13-686 i686
Web server: Apache/2.4.54 (Debian)
PHP version: 7.4.30 (Does not support 64bit values)
I've found out, that I missed to deactivate one plugin: "Simple Lightbox" https://archetyped.com/tools/simple-lightbox/
When I deactivated it, the post are rendered as usual.
#3
@
3 years ago
Hi @anniew86,
may I kindly ask you the precise steps to reproduce this error?
Thanks in advance
#4
@
3 years ago
it was an error in the plugin "Simple Lightbox", the authors corrected it in the last version 2.9.3, they mentioned it in the changelog: "Hotfix: WordPress 6.1 wp_rand() bug (32-bit platforms) (#974)" https://github.com/archetyped/simple-lightbox/issues/974
Hi there, welcome to WordPress Trac! Thanks for the report.
The function was indeed updated for WP 6.1 in [53473] / #55194 to bring parity with the
random_int()andmt_rand()native PHP functions when$minand$maxvalues are both equal to0.At a glance, I don't see yet whether than change is related or not. Moving to 6.1.2 for investigation.