Changeset 1207

Show
Ignore:
Timestamp:
01/09/08 11:44:03 (11 months ago)
Author:
mikey
Message:

fixed problem with socket creation and error message (can not retrieve an error message with boolean value)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/util/net/stubBSDSocket.php

    r1206 r1207  
    225225        } 
    226226         
    227         $this->fp = socket_create($this->domain, $this->type, $this->protocol); 
     227        $this->fp = @socket_create($this->domain, $this->type, $this->protocol); 
    228228        if (false === $this->fp) { 
    229             $errorMessage = $this->lastError(); 
    230             $this->fp     = null; 
    231             throw new stubConnectionException(sprintf('Create of %s socket (type %s, protocol %s) failed: %s', 
     229            $this->fp = null; 
     230            throw new stubConnectionException(sprintf('Create of %s socket (type %s, protocol %s) failed.', 
    232231                                                      self::$domains[$this->domain], 
    233232                                                      self::$types[$this->type], 
    234                                                       getprotobynumber($this->protocol), 
    235                                                       $errorMessage 
     233                                                      getprotobynumber($this->protocol) 
    236234                                              ) 
    237235                      );