Coding Standards: Fix instances of WordPress.PHP.NoSilencedErrors.Discouraged.
Noteable changes: - The `magic_quotes_runtime` and `magic_quotes_sybase` settings were removed in PHP 5.4, so no longer need to be set. - Some functions that use external libraries can generate errors that can't be tested for, so are globally allowed to silence errors. - Quite a few functions would cause errors if `safe_mode` was set. This setting was removed in PHP 5.4. - Only a handful of `header()` calls needed corresponding `headers_sent()` checks for unit tests to pass, but more may need to be added as the nightlies builds are tested. See #46732. Built from https://develop.svn.wordpress.org/trunk@45611 git-svn-id: http://core.svn.wordpress.org/trunk@45422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -3251,7 +3251,7 @@ function wp_ajax_get_revision_diffs() {
|
||||
}
|
||||
|
||||
$return = array();
|
||||
@set_time_limit( 0 );
|
||||
set_time_limit( 0 );
|
||||
|
||||
foreach ( $_REQUEST['compare'] as $compare_key ) {
|
||||
list( $compare_from, $compare_to ) = explode( ':', $compare_key ); // from:to
|
||||
|
||||
@@ -95,7 +95,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
* @return string|false The current working directory on success, false on failure.
|
||||
*/
|
||||
public function cwd() {
|
||||
return @getcwd();
|
||||
return getcwd();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -126,10 +126,10 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
return false;
|
||||
}
|
||||
if ( ! $recursive ) {
|
||||
return @chgrp( $file, $group );
|
||||
return chgrp( $file, $group );
|
||||
}
|
||||
if ( ! $this->is_dir( $file ) ) {
|
||||
return @chgrp( $file, $group );
|
||||
return chgrp( $file, $group );
|
||||
}
|
||||
// Is a directory, and we want recursive
|
||||
$file = trailingslashit( $file );
|
||||
@@ -165,7 +165,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
}
|
||||
|
||||
if ( ! $recursive || ! $this->is_dir( $file ) ) {
|
||||
return @chmod( $file, $mode );
|
||||
return chmod( $file, $mode );
|
||||
}
|
||||
// Is a directory, and we want recursive
|
||||
$file = trailingslashit( $file );
|
||||
@@ -193,10 +193,10 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
return false;
|
||||
}
|
||||
if ( ! $recursive ) {
|
||||
return @chown( $file, $owner );
|
||||
return chown( $file, $owner );
|
||||
}
|
||||
if ( ! $this->is_dir( $file ) ) {
|
||||
return @chown( $file, $owner );
|
||||
return chown( $file, $owner );
|
||||
}
|
||||
// Is a directory, and we want recursive
|
||||
$filelist = $this->dirlist( $file );
|
||||
@@ -476,7 +476,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
if ( $atime == 0 ) {
|
||||
$atime = time();
|
||||
}
|
||||
return @touch( $file, $time, $atime );
|
||||
return touch( $file, $time, $atime );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -564,11 +564,11 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
$limit_file = false;
|
||||
}
|
||||
|
||||
if ( ! $this->is_dir( $path ) ) {
|
||||
if ( ! $this->is_dir( $path ) || ! $this->is_readable( $dir ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$dir = @dir( $path );
|
||||
$dir = dir( $path );
|
||||
if ( ! $dir ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
}
|
||||
|
||||
// Set the Connection to use Passive FTP
|
||||
@ftp_pasv( $this->link, true );
|
||||
ftp_pasv( $this->link, true );
|
||||
if ( @ftp_get_option( $this->link, FTP_TIMEOUT_SEC ) < FS_TIMEOUT ) {
|
||||
@ftp_set_option( $this->link, FTP_TIMEOUT_SEC, FS_TIMEOUT );
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! @ftp_fget( $this->link, $temp, $file, FTP_BINARY ) ) {
|
||||
if ( ! ftp_fget( $this->link, $temp, $file, FTP_BINARY ) ) {
|
||||
fclose( $temp );
|
||||
unlink( $tempfile );
|
||||
return false;
|
||||
@@ -205,7 +205,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
|
||||
fseek( $temp, 0 ); // Skip back to the start of the file being written to
|
||||
|
||||
$ret = @ftp_fput( $this->link, $file, $temp, FTP_BINARY );
|
||||
$ret = ftp_fput( $this->link, $file, $temp, FTP_BINARY );
|
||||
|
||||
fclose( $temp );
|
||||
unlink( $tempfile );
|
||||
@@ -223,7 +223,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
* @return string|false The current working directory on success, false on failure.
|
||||
*/
|
||||
public function cwd() {
|
||||
$cwd = @ftp_pwd( $this->link );
|
||||
$cwd = ftp_pwd( $this->link );
|
||||
if ( $cwd ) {
|
||||
$cwd = trailingslashit( $cwd );
|
||||
}
|
||||
@@ -275,9 +275,9 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
|
||||
// chmod the file or directory
|
||||
if ( ! function_exists( 'ftp_chmod' ) ) {
|
||||
return (bool) @ftp_site( $this->link, sprintf( 'CHMOD %o %s', $mode, $file ) );
|
||||
return (bool) ftp_site( $this->link, sprintf( 'CHMOD %o %s', $mode, $file ) );
|
||||
}
|
||||
return (bool) @ftp_chmod( $this->link, $mode, $file );
|
||||
return (bool) ftp_chmod( $this->link, $mode, $file );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -375,10 +375,10 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
return false;
|
||||
}
|
||||
if ( 'f' == $type || $this->is_file( $file ) ) {
|
||||
return @ftp_delete( $this->link, $file );
|
||||
return ftp_delete( $this->link, $file );
|
||||
}
|
||||
if ( ! $recursive ) {
|
||||
return @ftp_rmdir( $this->link, $file );
|
||||
return ftp_rmdir( $this->link, $file );
|
||||
}
|
||||
|
||||
$filelist = $this->dirlist( trailingslashit( $file ) );
|
||||
@@ -387,7 +387,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
$this->delete( trailingslashit( $file ) . $delete_file['name'], $recursive, $delete_file['type'] );
|
||||
}
|
||||
}
|
||||
return @ftp_rmdir( $this->link, $file );
|
||||
return ftp_rmdir( $this->link, $file );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -399,7 +399,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
* @return bool Whether $file exists or not.
|
||||
*/
|
||||
public function exists( $file ) {
|
||||
$list = @ftp_nlist( $this->link, $file );
|
||||
$list = ftp_nlist( $this->link, $file );
|
||||
|
||||
if ( empty( $list ) && $this->is_dir( $file ) ) {
|
||||
return true; // File is an empty directory.
|
||||
@@ -536,7 +536,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! @ftp_mkdir( $this->link, $path ) ) {
|
||||
if ( ! ftp_mkdir( $this->link, $path ) ) {
|
||||
return false;
|
||||
}
|
||||
$this->chmod( $path, $chmod );
|
||||
@@ -587,7 +587,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
$b['year'] = $lucifer[3];
|
||||
$b['hour'] = $lucifer[4];
|
||||
$b['minute'] = $lucifer[5];
|
||||
$b['time'] = @mktime( $lucifer[4] + ( strcasecmp( $lucifer[6], 'PM' ) == 0 ? 12 : 0 ), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3] );
|
||||
$b['time'] = mktime( $lucifer[4] + ( strcasecmp( $lucifer[6], 'PM' ) == 0 ? 12 : 0 ), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3] );
|
||||
$b['am/pm'] = $lucifer[6];
|
||||
$b['name'] = $lucifer[8];
|
||||
} elseif ( ! $is_windows ) {
|
||||
@@ -617,7 +617,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
if ( $lcount == 8 ) {
|
||||
sscanf( $lucifer[5], '%d-%d-%d', $b['year'], $b['month'], $b['day'] );
|
||||
sscanf( $lucifer[6], '%d:%d', $b['hour'], $b['minute'] );
|
||||
$b['time'] = @mktime( $b['hour'], $b['minute'], 0, $b['month'], $b['day'], $b['year'] );
|
||||
$b['time'] = mktime( $b['hour'], $b['minute'], 0, $b['month'], $b['day'], $b['year'] );
|
||||
$b['name'] = $lucifer[7];
|
||||
} else {
|
||||
$b['month'] = $lucifer[5];
|
||||
@@ -678,11 +678,11 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
$limit_file = false;
|
||||
}
|
||||
|
||||
$pwd = @ftp_pwd( $this->link );
|
||||
$pwd = ftp_pwd( $this->link );
|
||||
if ( ! @ftp_chdir( $this->link, $path ) ) { // Can't change to folder = folder doesn't exist.
|
||||
return false;
|
||||
}
|
||||
$list = @ftp_rawlist( $this->link, '-a', false );
|
||||
$list = ftp_rawlist( $this->link, '-a', false );
|
||||
@ftp_chdir( $this->link, $pwd );
|
||||
|
||||
if ( empty( $list ) ) { // Empty array = non-existent folder (real folder will show . at least).
|
||||
|
||||
@@ -33,7 +33,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
|
||||
$this->errors = new WP_Error();
|
||||
|
||||
// Check if possible to use ftp functions.
|
||||
if ( ! @include_once( ABSPATH . 'wp-admin/includes/class-ftp.php' ) ) {
|
||||
if ( ! include_once( ABSPATH . 'wp-admin/includes/class-ftp.php' ) ) {
|
||||
return;
|
||||
}
|
||||
$this->ftp = new ftp();
|
||||
|
||||
@@ -484,7 +484,17 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
* @return bool True on success, false on failure.
|
||||
*/
|
||||
public function move( $source, $destination, $overwrite = false ) {
|
||||
return @ssh2_sftp_rename( $this->sftp_link, $source, $destination );
|
||||
if ( $this->exists( $destination ) ) {
|
||||
if ( $overwrite ) {
|
||||
// We need to remove the destination file before we can rename the source.
|
||||
$this->delete( $destination, false, 'f' );
|
||||
} else {
|
||||
// If we're not overwriting, the rename will fail, so return early.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return ssh2_sftp_rename( $this->sftp_link, $source, $destination );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -711,12 +721,12 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
$limit_file = false;
|
||||
}
|
||||
|
||||
if ( ! $this->is_dir( $path ) ) {
|
||||
if ( ! $this->is_dir( $path ) || ! $this->is_readable( $path ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$ret = array();
|
||||
$dir = @dir( $this->sftp_path( $path ) );
|
||||
$dir = dir( $this->sftp_path( $path ) );
|
||||
|
||||
if ( ! $dir ) {
|
||||
return false;
|
||||
|
||||
@@ -465,7 +465,7 @@ class WP_Upgrader {
|
||||
$destination = $args['destination'];
|
||||
$clear_destination = $args['clear_destination'];
|
||||
|
||||
@set_time_limit( 300 );
|
||||
set_time_limit( 300 );
|
||||
|
||||
if ( empty( $source ) || empty( $destination ) ) {
|
||||
return new WP_Error( 'bad_request', $this->strings['bad_request'] );
|
||||
|
||||
@@ -165,8 +165,9 @@ function list_files( $folder = '', $levels = 100, $exclusions = array() ) {
|
||||
$files[] = $folder . $file;
|
||||
}
|
||||
}
|
||||
|
||||
closedir( $dir );
|
||||
}
|
||||
@closedir( $dir );
|
||||
|
||||
return $files;
|
||||
}
|
||||
@@ -514,7 +515,7 @@ function wp_edit_theme_plugin_file( $args ) {
|
||||
}
|
||||
|
||||
// Make sure PHP process doesn't die before loopback requests complete.
|
||||
@set_time_limit( 300 );
|
||||
set_time_limit( 300 );
|
||||
|
||||
// Time to wait for loopback requests to finish.
|
||||
$timeout = 100;
|
||||
@@ -780,7 +781,7 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
|
||||
}
|
||||
|
||||
// A properly uploaded file will pass this test. There should be no reason to override this one.
|
||||
$test_uploaded_file = 'wp_handle_upload' === $action ? @ is_uploaded_file( $file['tmp_name'] ) : @ is_readable( $file['tmp_name'] );
|
||||
$test_uploaded_file = 'wp_handle_upload' === $action ? is_uploaded_file( $file['tmp_name'] ) : @is_readable( $file['tmp_name'] );
|
||||
if ( ! $test_uploaded_file ) {
|
||||
return call_user_func_array( $upload_error_handler, array( &$file, __( 'Specified file failed upload test.' ) ) );
|
||||
}
|
||||
@@ -848,10 +849,11 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
|
||||
|
||||
if ( null === $move_new_file ) {
|
||||
if ( 'wp_handle_upload' === $action ) {
|
||||
$move_new_file = @ move_uploaded_file( $file['tmp_name'], $new_file );
|
||||
$move_new_file = @move_uploaded_file( $file['tmp_name'], $new_file );
|
||||
} else {
|
||||
// use copy and unlink because rename breaks streams.
|
||||
$move_new_file = @ copy( $file['tmp_name'], $new_file );
|
||||
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
|
||||
$move_new_file = @copy( $file['tmp_name'], $new_file );
|
||||
unlink( $file['tmp_name'] );
|
||||
}
|
||||
|
||||
@@ -868,7 +870,7 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
|
||||
// Set correct file permissions.
|
||||
$stat = stat( dirname( $new_file ) );
|
||||
$perms = $stat['mode'] & 0000666;
|
||||
@ chmod( $new_file, $perms );
|
||||
chmod( $new_file, $perms );
|
||||
|
||||
// Compute the URL.
|
||||
$url = $uploads['url'] . "/$filename";
|
||||
@@ -1854,7 +1856,7 @@ function get_filesystem_method( $args = array(), $context = '', $allow_relaxed_f
|
||||
$GLOBALS['_wp_filesystem_direct_method'] = 'relaxed_ownership';
|
||||
}
|
||||
|
||||
@fclose( $temp_handle );
|
||||
fclose( $temp_handle );
|
||||
@unlink( $temp_file_name );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ function wp_update_image_subsizes( $attachment_id ) {
|
||||
function wp_create_image_subsizes( $file, $image_meta, $attachment_id ) {
|
||||
if ( empty( $image_meta ) || ! isset( $image_meta['width'], $image_meta['height'] ) ) {
|
||||
// New uploaded image.
|
||||
$imagesize = getimagesize( $file );
|
||||
$imagesize = @getimagesize( $file );
|
||||
$image_meta['width'] = $imagesize[0];
|
||||
$image_meta['height'] = $imagesize[1];
|
||||
|
||||
@@ -450,7 +450,11 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
|
||||
* @return int|float
|
||||
*/
|
||||
function wp_exif_frac2dec( $str ) {
|
||||
@list( $n, $d ) = explode( '/', $str );
|
||||
if ( false === strpos( $str, '/' ) ) {
|
||||
return $str;
|
||||
}
|
||||
|
||||
list( $n, $d ) = explode( '/', $str );
|
||||
if ( ! empty( $d ) ) {
|
||||
return $n / $d;
|
||||
}
|
||||
@@ -466,8 +470,8 @@ function wp_exif_frac2dec( $str ) {
|
||||
* @return int
|
||||
*/
|
||||
function wp_exif_date2ts( $str ) {
|
||||
@list( $date, $time ) = explode( ' ', trim( $str ) );
|
||||
@list( $y, $m, $d ) = explode( ':', $date );
|
||||
list( $date, $time ) = explode( ' ', trim( $str ) );
|
||||
list( $y, $m, $d ) = explode( ':', $date );
|
||||
|
||||
return strtotime( "{$y}-{$m}-{$d} {$time}" );
|
||||
}
|
||||
@@ -863,7 +867,7 @@ function _copy_image_file( $attachment_id ) {
|
||||
*/
|
||||
wp_mkdir_p( dirname( $dst_file ) );
|
||||
|
||||
if ( ! @copy( $src_file, $dst_file ) ) {
|
||||
if ( ! copy( $src_file, $dst_file ) ) {
|
||||
$dst_file = false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -376,7 +376,7 @@ function get_mu_plugins() {
|
||||
return $wp_plugins;
|
||||
}
|
||||
|
||||
@closedir( $plugins_dir );
|
||||
closedir( $plugins_dir );
|
||||
|
||||
if ( empty( $plugin_files ) ) {
|
||||
return $wp_plugins;
|
||||
@@ -444,7 +444,7 @@ function get_dropins() {
|
||||
return $dropins;
|
||||
}
|
||||
|
||||
@closedir( $plugins_dir );
|
||||
closedir( $plugins_dir );
|
||||
|
||||
if ( empty( $plugin_files ) ) {
|
||||
return $dropins;
|
||||
|
||||
@@ -1901,7 +1901,7 @@ function iframe_header( $title = '', $deprecated = false ) {
|
||||
|
||||
$current_screen = get_current_screen();
|
||||
|
||||
@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
|
||||
header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
|
||||
_wp_admin_html_begin();
|
||||
?>
|
||||
<title><?php bloginfo( 'name' ); ?> › <?php echo $title; ?> — <?php _e( 'WordPress' ); ?></title>
|
||||
@@ -2324,7 +2324,7 @@ function _wp_admin_html_begin() {
|
||||
$admin_html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : '';
|
||||
|
||||
if ( $is_IE ) {
|
||||
@header( 'X-UA-Compatible: IE=edge' );
|
||||
header( 'X-UA-Compatible: IE=edge' );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -881,7 +881,7 @@ $_new_bundled_files = array(
|
||||
function update_core( $from, $to ) {
|
||||
global $wp_filesystem, $_old_files, $_new_bundled_files, $wpdb;
|
||||
|
||||
@set_time_limit( 300 );
|
||||
set_time_limit( 300 );
|
||||
|
||||
/**
|
||||
* Filters feedback messages displayed during the core update process.
|
||||
|
||||
@@ -608,7 +608,7 @@ https://wordpress.org/
|
||||
$login_url
|
||||
);
|
||||
|
||||
@wp_mail( $email, __( 'New WordPress Site' ), $message );
|
||||
wp_mail( $email, __( 'New WordPress Site' ), $message );
|
||||
}
|
||||
endif;
|
||||
|
||||
@@ -2969,7 +2969,7 @@ function make_site_theme_from_oldschool( $theme_name, $template ) {
|
||||
if ( $oldfile == 'index.php' ) {
|
||||
$index = implode( '', file( "$oldpath/$oldfile" ) );
|
||||
if ( strpos( $index, 'WP_USE_THEMES' ) !== false ) {
|
||||
if ( ! @copy( WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME . '/index.php', "$site_dir/$newfile" ) ) {
|
||||
if ( ! copy( WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME . '/index.php', "$site_dir/$newfile" ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2978,7 +2978,7 @@ function make_site_theme_from_oldschool( $theme_name, $template ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! @copy( "$oldpath/$oldfile", "$site_dir/$newfile" ) ) {
|
||||
if ( ! copy( "$oldpath/$oldfile", "$site_dir/$newfile" ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3039,19 +3039,20 @@ function make_site_theme_from_default( $theme_name, $template ) {
|
||||
// Copy files from the default theme to the site theme.
|
||||
//$files = array('index.php', 'comments.php', 'comments-popup.php', 'footer.php', 'header.php', 'sidebar.php', 'style.css');
|
||||
|
||||
$theme_dir = @ opendir( $default_dir );
|
||||
$theme_dir = @opendir( $default_dir );
|
||||
if ( $theme_dir ) {
|
||||
while ( ( $theme_file = readdir( $theme_dir ) ) !== false ) {
|
||||
if ( is_dir( "$default_dir/$theme_file" ) ) {
|
||||
continue;
|
||||
}
|
||||
if ( ! @copy( "$default_dir/$theme_file", "$site_dir/$theme_file" ) ) {
|
||||
if ( ! copy( "$default_dir/$theme_file", "$site_dir/$theme_file" ) ) {
|
||||
return;
|
||||
}
|
||||
chmod( "$site_dir/$theme_file", 0777 );
|
||||
}
|
||||
|
||||
closedir( $theme_dir );
|
||||
}
|
||||
@closedir( $theme_dir );
|
||||
|
||||
// Rewrite the theme header.
|
||||
$stylelines = explode( "\n", implode( '', file( "$site_dir/style.css" ) ) );
|
||||
@@ -3081,19 +3082,20 @@ function make_site_theme_from_default( $theme_name, $template ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$images_dir = @ opendir( "$default_dir/images" );
|
||||
$images_dir = @opendir( "$default_dir/images" );
|
||||
if ( $images_dir ) {
|
||||
while ( ( $image = readdir( $images_dir ) ) !== false ) {
|
||||
if ( is_dir( "$default_dir/images/$image" ) ) {
|
||||
continue;
|
||||
}
|
||||
if ( ! @copy( "$default_dir/images/$image", "$site_dir/images/$image" ) ) {
|
||||
if ( ! copy( "$default_dir/images/$image", "$site_dir/images/$image" ) ) {
|
||||
return;
|
||||
}
|
||||
chmod( "$site_dir/images/$image", 0777 );
|
||||
}
|
||||
|
||||
closedir( $images_dir );
|
||||
}
|
||||
@closedir( $images_dir );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user