Completed
Push — master ( 544bdf...d3e666 )
by Askupa
01:56
created
Form.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,8 +63,9 @@
 block discarded – undo
63 63
         if( !isset($this->fields[$taxonomy_name][$field_name]))
64 64
         {
65 65
             $this->fields[$taxonomy_name][$field_name] = array_merge( $this->default_props(), $field_props );
66
+        } else {
67
+            throw new \RuntimeException("A field named '$field_name' has already been registered in '$taxonomy_name'");
66 68
         }
67
-        else throw new \RuntimeException("A field named '$field_name' has already been registered in '$taxonomy_name'");
68 69
     }
69 70
     
70 71
     /**
Please login to merge, or discard this patch.
functions.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,9 @@
 block discarded – undo
18 18
 /**
19 19
  * Prevent loading the library more than once
20 20
  */
21
-if( defined( 'AMARKAL_TAXONOMY' ) ) return false;
21
+if( defined( 'AMARKAL_TAXONOMY' ) ) {
22
+    return false;
23
+}
22 24
 define( 'AMARKAL_TAXONOMY', true );
23 25
 
24 26
 if(!function_exists('amarkal_taxonomy_add_field'))
Please login to merge, or discard this patch.