diff --git a/src/console/controllers/Migrate.php b/src/console/controllers/Migrate.php
index <HASH>..<HASH> 100644
--- a/src/console/controllers/Migrate.php
+++ b/src/console/controllers/Migrate.php
@@ -89,7 +89,7 @@ class Migrate extends Controller
 
         $custom_name = false;
 
-        if (count($argv)) {
+        if ($argv && count($argv)) {
 
             $custom_name = mb_strtolower($argv[0], 'utf-8');
         }
diff --git a/src/web/Form.php b/src/web/Form.php
index <HASH>..<HASH> 100755
--- a/src/web/Form.php
+++ b/src/web/Form.php
@@ -46,7 +46,7 @@ class Form
             $data = $data->to_array();
         }
 
-        if (count($data)) {
+        if (is_array($data)) {
             foreach (array_intersect_key($data, $this->_fields) as $key => $value) {
                 $this->set($key, $value);
             }
Fix count (php<I>)