Opened 7 years ago
Last modified 7 years ago
#49014 reopened defect (bug)
Silence set_time_limit() call in wp-admin/includes/class-wp-upgrader.php
| Reported by: | autotutorial | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Upgrade/Install | Version: | |
| Severity: | trivial | Keywords: | needs-patch |
| Cc: | Focuses: |
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)
#2
follow-up:
↓ 3
@
7 years ago
- Severity normal → 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
@
7 years ago
- Milestone → Awaiting Review
- Resolution duplicate
- Status closed → reopened
- Summary functions.php open_basedir → 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
@
7 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.
![(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, we're already tracking this issue in #48960.