Skip to content

Commit 063161f

Browse files
authored
Merge pull request #486 from cloudinary/fix/missing-key
Ensure that the key is set
2 parents ba82bc9 + 13e893e commit 063161f

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)