[wp-trac] [WordPress Trac] #49014: functions.php open_basedir
WordPress Trac
noreply at wordpress.org
Tue Dec 17 15:39:09 UTC 2019
#49014: functions.php open_basedir
-----------------------------+-----------------------------
Reporter: autotutorial | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version:
Severity: normal | Keywords: needs-patch
Focuses: |
-----------------------------+-----------------------------
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
<?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 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49014>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list