Skip to content

Commit d3f50d5

Browse files
author
Marco Pereirinha
committed
Make sure that array key exists
1 parent 560b20c commit d3f50d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php/class-media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,7 @@ public function get_breakpoint_options( $attachment_id ) {
17181718
$breakpoints = array();
17191719
$settings = $this->settings->get_setting( self::MEDIA_SETTINGS_SLUG )->get_value();
17201720

1721-
if ( $settings['enable_breakpoints'] && wp_attachment_is_image( $attachment_id ) ) {
1721+
if ( ! empty( $settings['enable_breakpoints'] ) && wp_attachment_is_image( $attachment_id ) ) {
17221722
$meta = wp_get_attachment_metadata( $attachment_id );
17231723
// Get meta image size if non exists.
17241724
if ( empty( $meta ) ) {

0 commit comments

Comments
 (0)