Completed
Push — trunk ( 972cb3...3e2b5c )
by
unknown
896:19 queued 880:55
created
includes/types/CMB2_Type_File.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@  discard block
 block discarded – undo
24 24
 		$img_size_data = parent::get_image_size_data( $img_size, 'large' );
25 25
 
26 26
 		// if options array and 'url' => false, then hide the url field
27
-		$input_type = array_key_exists( 'url', $options ) && false === $options['url'] ? 'hidden' : 'text';
27
+		$input_type = array_key_exists( 'url', $options ) && false === $options[ 'url' ] ? 'hidden' : 'text';
28 28
 
29 29
 		$output .= parent::render( array(
30 30
 			'type'  => $input_type,
31 31
 			'class' => 'cmb2-upload-file regular-text',
32 32
 			'size'  => 45,
33 33
 			'desc'  => '',
34
-			'data-previewsize' => sprintf( '[%d,%d]', $img_size_data['width'], $img_size_data['height'] ),
35
-			'data-sizename'    => $img_size_data['name'],
34
+			'data-previewsize' => sprintf( '[%d,%d]', $img_size_data[ 'width' ], $img_size_data[ 'height' ] ),
35
+			'data-sizename'    => $img_size_data[ 'name' ],
36 36
 			'data-queryargs'   => ! empty( $query_args ) ? json_encode( $query_args ) : '',
37 37
 			'js_dependencies'  => 'media-editor',
38 38
 		) );
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 						'class' => 'cmb-file-field-image',
83 83
 					) );
84 84
 				} else {
85
-					$image = '<img style="max-width: ' . absint( $img_size_data['width'] ) . 'px; width: 100%;" src="' . $meta_value . '" class="cmb-file-field-image" alt="" />';
85
+					$image = '<img style="max-width: ' . absint( $img_size_data[ 'width' ] ) . 'px; width: 100%;" src="' . $meta_value . '" class="cmb-file-field-image" alt="" />';
86 86
 				}
87 87
 
88 88
 				$output .= $this->img_status_output( array(
Please login to merge, or discard this patch.