浏览代码

Cast port to an integer to avoid string cmp warnings

Daniel Gempesaw 10 年之前
父节点
当前提交
5e9ed66d3f
共有 1 个文件被更改,包括 3 次插入3 次删除
  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);