Skip to content

Commit 13e893e

Browse files
author
Marco Pereirinha
committed
Ensure that the key is set
1 parent 5900a08 commit 13e893e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

php/class-media.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,9 @@ function ( $part ) {
769769
* @return array The array of found transformations within the string.
770770
*/
771771
public function get_transformations_from_string( $str, $type = 'image' ) {
772+
if ( ! isset( Api::$transformation_index[ $type ] ) ) {
773+
return array();
774+
}
772775

773776
$params = Api::$transformation_index[ $type ];
774777

0 commit comments

Comments
 (0)