Procházet zdrojové kódy

Cast port to an integer to avoid string cmp warnings

Daniel Gempesaw před 10 roky
rodič
revize
5e9ed66d3f
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      lib/Selenium/CanStartBinary.pm

+ 3 - 3
lib/Selenium/CanStartBinary.pm

@@ -116,7 +116,7 @@ has '+port' => (
             return find_open_port_above($self->binary_port);
         }
         else {
-            return '4444'
+            return 4444
         }
     }
 );
@@ -212,8 +212,8 @@ sub _build_binary_mode {
     return unless $self->binary;
 
     # Either the user asked for 4444, or we couldn't find an open port
-    my $port = $self->port;
-    return unless $port != 4444;
+    my $port = $self->port + 0;
+    return if $port == 4444;
 
     if ($self->isa('Selenium::Firefox')) {
         setup_firefox_binary_env($port);