diff --git a/inc/class-img-shortcode.php b/inc/class-img-shortcode.php index 25f57ea..ac83c82 100644 --- a/inc/class-img-shortcode.php +++ b/inc/class-img-shortcode.php @@ -31,7 +31,7 @@ public static function get_shortcode_ui_args() { $size = get_option( "${key}_size_w" ); if ( false === $size ) { - if ( array_key_exists( $key, $_wp_additional_image_sizes ) ) { + if ( isset( $_wp_additional_image_sizes ) && array_key_exists( $key, $_wp_additional_image_sizes ) ) { $size = $_wp_additional_image_sizes[ $key ]['width']; } }