Skip to content

Commit

Permalink
Merge pull request #3958 from pods-framework/feature/#3957
Browse files Browse the repository at this point in the history
Fix undefined index notice with Gallery options in file field
  • Loading branch information
pglewis committed Jan 30, 2017
2 parents 64a21b6 + ae9647c commit f87bb27
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

0 comments on commit f87bb27

Please sign in to comment.