diff --git a/library/Public.php b/library/Public.php
index <HASH>..<HASH> 100644
--- a/library/Public.php
+++ b/library/Public.php
@@ -136,11 +136,10 @@ if (!function_exists('municipio_get_mime_link_item')) {
 if (!function_exists('municipio_to_aspect_ratio')) {
     function municipio_to_aspect_ratio($ratio, $size)
     {
-        $ratio = explode(':', $ratio);
-
-        $width = round($size[0]);
-        $height = round(($width / $ratio[0]) * $ratio[1]);
-
+        if (count($ratio = explode(":", $ratio)) == 2) {
+            $width  = round($size[0]);
+            $height = round(($width / $ratio[0]) * $ratio[1]);
+        }
         return array($width, $height);
     }
 }
Check that ratio is set before calculating.