Opened 5 years ago
Last modified 5 years ago
#49014 reopened defect (bug)
Silence set_time_limit() call in wp-admin/includes/class-wp-upgrader.php
Reported by: | autotutorial | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | trivial | Version: | |
Component: | Upgrade/Install | Keywords: | needs-patch |
Focuses: | Cc: |
Description
Aggiornamento delle traduzioni per Twenty Twenty (it_IT)…
Warning: scandir(/home/.dummy/temp/): failed to open dir: Permission denied in /home/user/wp/wp-includes/functions.php on line 2479
Warning: scandir(): (errno 13): Permission denied in /home/user/wp/wp-includes/functions.php on line 2479
Warning: array_diff(): Argument #1 is not an array in /home/user/wp-includes/functions.php on line 2479
Notice: set_time_limit() has been disabled for security reasons in /home/user/wp-admin/includes/class-wp-upgrader.php on line 468
Le traduzioni sono state aggiornate con successo.
Tutti gli aggiornamenti sono stati completati.
<?php //Compatibily wiht open_basedir $dir_trim = dirname( '/' . trim($dir, '/\\') . '/' ) !== '.' ? $dir_default = array( '.','..' ) : $dir_default = array( '.' ); $dir_arr = @scandir( $dir ); if( !$dir_arr ) { unset( $dir_arr ); $dir_arr = $dir_default; } //restore key $files = array_values( array_diff( $dir_arr, array( '.', '..' ) ) ); unset( $dir_default, $dir_array, $dir_trim );
Change History (4)
#1
@
5 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
#2
follow-up:
↓ 3
@
5 years ago
- Severity changed from normal to trivial
Notice: set_time_limit() has been disabled for security reasons in /home/user/wp-admin/includes/class-wp-upgrader.php on line 468
Hi thanks for the welcome, the set_time_limit notice must be silenced.
#3
in reply to:
↑ 2
@
5 years ago
- Milestone set to Awaiting Review
- Resolution duplicate deleted
- Status changed from closed to reopened
- Summary changed from functions.php open_basedir to Silence set_time_limit() call in wp-admin/includes/class-wp-upgrader.php
Replying to autotutorial:
Notice: set_time_limit() has been disabled for security reasons in /home/user/wp-admin/includes/class-wp-upgrader.php on line 468
Hi thanks for the welcome, the set_time_limit notice must be silenced.
Reopening to address that.
The silence operator was removed in [45611/trunk/src/wp-admin/includes/class-wp-upgrader.php].
Just noting there are at least 6 instances of set_time_limit()
in WordPress core (not counting external libraries), only one of which is silenced (in wp_get_http()
).
#4
@
5 years ago
Thanks for your answer from WordPress 5.2 the minimum php requirement is 5.6.20, I wonder if you have any precedent to temporarily disable error_reporting(0) in order not to use the suppression operator (it's slow).
Obviously for all those probable functions disabled but necessary for WordPress ini_get, ini_set, chmod, buffer, temporary directory etc.
Downloading the file the weight is known but the Download and Upload speed is unknown, you could add a pre-calculation for the zip files (WordPress update, plugin, repository theme)
, subsequently calculate the variable speed.
For the second question, I am afraid there is not much to do to create the code to handle this because it is very complex.
Hi there, welcome to WordPress Trac!
Thanks for the report, we're already tracking this issue in #48960.