mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed member directory notices;
This commit is contained in:
@@ -213,17 +213,17 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
||||
public function validate_upload( $file ){
|
||||
|
||||
|
||||
if( 'image' == $this->upload_type ){
|
||||
if ( 'image' == $this->upload_type ) {
|
||||
|
||||
$error = $this->validate_image_data( $file['tmp_name'], $this->field_key );
|
||||
|
||||
}else if( 'file' == $this->upload_type ){
|
||||
} elseif( 'file' == $this->upload_type ) {
|
||||
|
||||
$error = $this->validate_file_data( $file['tmp_name'], $this->field_key );
|
||||
|
||||
}
|
||||
|
||||
if( $error ){
|
||||
if ( $error ) {
|
||||
$file['error'] = $error;
|
||||
}
|
||||
|
||||
@@ -610,18 +610,18 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
||||
$response['handle_upload'] = $movefile;
|
||||
|
||||
return $response;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check image upload and handle errors
|
||||
*
|
||||
* @param $file
|
||||
* @param $field
|
||||
*
|
||||
* @return null|string|void
|
||||
* @return null|string
|
||||
*/
|
||||
public function validate_image_data( $file, $field_key ){
|
||||
public function validate_image_data( $file, $field_key ) {
|
||||
$error = null;
|
||||
|
||||
if ( ! function_exists( 'wp_get_image_editor' ) ) {
|
||||
@@ -729,9 +729,9 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
||||
|
||||
|
||||
return $error;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check file upload and handle errors
|
||||
*
|
||||
@@ -740,7 +740,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
||||
*
|
||||
* @return null|string
|
||||
*/
|
||||
public function validate_file_data( $file, $field_key ){
|
||||
public function validate_file_data( $file, $field_key ) {
|
||||
$error = null;
|
||||
|
||||
if ( ! function_exists( 'wp_get_image_editor' ) ) {
|
||||
|
||||
Reference in New Issue
Block a user