Code Duplication    Length = 3-3 lines in 2 locations

class/class-IXR.php 2 locations

@@ 677-679 (lines=3) @@
674
        $request .= "Content-length: {$length}$r$r";
675
        $request .= $xml;
676
        // Now send the request
677
        if ($this->debug) {
678
            echo '<pre>' . htmlspecialchars($request, ENT_QUOTES | ENT_HTML5) . "\n</pre>\n\n";
679
        }
680
        $fp = @fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout);
681
        if (!$fp) {
682
            $this->error = new IXR_Error(-32300, 'transport error - could not open socket');
@@ 708-710 (lines=3) @@
705
                $contents .= trim($line) . "\n";
706
            }
707
        }
708
        if ($this->debug) {
709
            echo '<pre>' . htmlspecialchars($contents, ENT_QUOTES | ENT_HTML5) . "\n</pre>\n\n";
710
        }
711
        // Now parse what we've got back
712
        $this->message = new IXR_Message($contents);
713
        if (!$this->message->parse()) {