diff --git a/php/class-media.php b/php/class-media.php index 58c9a1b6f..6e5ca50ac 100644 --- a/php/class-media.php +++ b/php/class-media.php @@ -769,6 +769,9 @@ function ( $part ) { * @return array The array of found transformations within the string. */ public function get_transformations_from_string( $str, $type = 'image' ) { + if ( ! isset( Api::$transformation_index[ $type ] ) ) { + return array(); + } $params = Api::$transformation_index[ $type ];