Skip to content

Commit

Permalink
Fix undefined index notice
Browse files Browse the repository at this point in the history
  • Loading branch information
JoryHogeveen committed Jan 23, 2017
1 parent 3453de2 commit ae9647c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/fields/file.php
Expand Up @@ -290,9 +290,9 @@ public function schema ( $options = null ) {
* @since 2.0
*/
public function display ( $value = null, $name = null, $options = null, $pod = null, $id = null ) {
if ( 1 == $options[ self::$type . '_wp_gallery_output' ] ) {
return $this->do_wp_gallery( $value, $options );
}
if ( ! empty( $options[ self::$type . '_wp_gallery_output' ] ) ) {
return $this->do_wp_gallery( $value, $options );
}

if ( is_array( $value ) && !empty( $value ) ) {
if ( isset( $value[ 'ID' ] ) )
Expand Down

1 comment on commit ae9647c

@oldskier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This was a large problem on many of my sites.

Please sign in to comment.