@@ -337,10 +337,10 @@ discard block |
||
| 337 | 337 | $server = $parts['host']; |
| 338 | 338 | $path = isset($parts['path']) ? $parts['path'] : ''; |
| 339 | 339 | if (isset($parts['query'])) { |
| 340 | - $path .= '?' . $parts['query']; |
|
| 340 | + $path .= '?'.$parts['query']; |
|
| 341 | 341 | } |
| 342 | 342 | if (isset($parts['fragment'])) { |
| 343 | - $path .= '#' . $parts['fragment']; |
|
| 343 | + $path .= '#'.$parts['fragment']; |
|
| 344 | 344 | } |
| 345 | 345 | if (isset($parts['port'])) { |
| 346 | 346 | $port = $parts['port']; |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | } |
| 357 | 357 | } |
| 358 | 358 | if ($path == '' || $path[0] != '/') { |
| 359 | - $this->path = '/' . $path; |
|
| 359 | + $this->path = '/'.$path; |
|
| 360 | 360 | } else { |
| 361 | 361 | $this->path = $path; |
| 362 | 362 | } |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | //$this->accepted_charset_encodings = $ch->knownCharsets(); |
| 389 | 389 | |
| 390 | 390 | // initialize user_agent string |
| 391 | - $this->user_agent = PhpXmlRpc::$xmlrpcName . ' ' . PhpXmlRpc::$xmlrpcVersion; |
|
| 391 | + $this->user_agent = PhpXmlRpc::$xmlrpcName.' '.PhpXmlRpc::$xmlrpcVersion; |
|
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | /** |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | */ |
| 561 | 561 | public function setSSLVerifyPeer($i) |
| 562 | 562 | { |
| 563 | - $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated'); |
|
| 563 | + $this->logDeprecation('Method '.__METHOD__.' is deprecated'); |
|
| 564 | 564 | |
| 565 | 565 | $this->verifypeer = $i; |
| 566 | 566 | return $this; |
@@ -577,7 +577,7 @@ discard block |
||
| 577 | 577 | */ |
| 578 | 578 | public function setSSLVerifyHost($i) |
| 579 | 579 | { |
| 580 | - $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated'); |
|
| 580 | + $this->logDeprecation('Method '.__METHOD__.' is deprecated'); |
|
| 581 | 581 | |
| 582 | 582 | $this->verifyhost = $i; |
| 583 | 583 | return $this; |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | */ |
| 594 | 594 | public function setSSLVersion($i) |
| 595 | 595 | { |
| 596 | - $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated'); |
|
| 596 | + $this->logDeprecation('Method '.__METHOD__.' is deprecated'); |
|
| 597 | 597 | |
| 598 | 598 | $this->sslversion = $i; |
| 599 | 599 | return $this; |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | */ |
| 659 | 659 | public function setRequestCompression($compMethod) |
| 660 | 660 | { |
| 661 | - $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated'); |
|
| 661 | + $this->logDeprecation('Method '.__METHOD__.' is deprecated'); |
|
| 662 | 662 | |
| 663 | 663 | $this->request_compression = $compMethod; |
| 664 | 664 | return $this; |
@@ -708,7 +708,7 @@ discard block |
||
| 708 | 708 | */ |
| 709 | 709 | public function setCurlOptions($options) |
| 710 | 710 | { |
| 711 | - $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated'); |
|
| 711 | + $this->logDeprecation('Method '.__METHOD__.' is deprecated'); |
|
| 712 | 712 | |
| 713 | 713 | $this->extracurlopts = $options; |
| 714 | 714 | return $this; |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | */ |
| 722 | 722 | public function setUseCurl($useCurlMode) |
| 723 | 723 | { |
| 724 | - $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated'); |
|
| 724 | + $this->logDeprecation('Method '.__METHOD__.' is deprecated'); |
|
| 725 | 725 | |
| 726 | 726 | $this->use_curl = $useCurlMode; |
| 727 | 727 | return $this; |
@@ -739,7 +739,7 @@ discard block |
||
| 739 | 739 | */ |
| 740 | 740 | public function setUserAgent($agentString) |
| 741 | 741 | { |
| 742 | - $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated'); |
|
| 742 | + $this->logDeprecation('Method '.__METHOD__.' is deprecated'); |
|
| 743 | 743 | |
| 744 | 744 | $this->user_agent = $agentString; |
| 745 | 745 | return $this; |
@@ -770,12 +770,12 @@ discard block |
||
| 770 | 770 | } |
| 771 | 771 | } |
| 772 | 772 | |
| 773 | - $url = $this->method . '://' . $this->server; |
|
| 773 | + $url = $this->method.'://'.$this->server; |
|
| 774 | 774 | if ($this->port == 0 || ($this->port == 80 && in_array($this->method, array('http', 'http10', 'http11', 'h2c'))) || |
| 775 | 775 | ($this->port == 443 && in_array($this->method, array('https', 'h2')))) { |
| 776 | - return $url . $this->path; |
|
| 776 | + return $url.$this->path; |
|
| 777 | 777 | } else { |
| 778 | - return $url . ':' . $this->port . $this->path; |
|
| 778 | + return $url.':'.$this->port.$this->path; |
|
| 779 | 779 | } |
| 780 | 780 | } |
| 781 | 781 | |
@@ -818,7 +818,7 @@ discard block |
||
| 818 | 818 | public function send($req, $timeout = 0, $method = '') |
| 819 | 819 | { |
| 820 | 820 | if ($method !== '' || $timeout !== 0) { |
| 821 | - $this->logDeprecation("Using non-default values for arguments 'method' and 'timeout' when calling method " . __METHOD__ . ' is deprecated'); |
|
| 821 | + $this->logDeprecation("Using non-default values for arguments 'method' and 'timeout' when calling method ".__METHOD__.' is deprecated'); |
|
| 822 | 822 | } |
| 823 | 823 | |
| 824 | 824 | // if user does not specify http protocol, use native method of this client |
@@ -937,7 +937,7 @@ discard block |
||
| 937 | 937 | $payload = $a; |
| 938 | 938 | $encodingHdr = "Content-Encoding: gzip\r\n"; |
| 939 | 939 | } else { |
| 940 | - $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': gzencode failure in compressing request'); |
|
| 940 | + $this->getLogger()->warning('XML-RPC: '.__METHOD__.': gzencode failure in compressing request'); |
|
| 941 | 941 | } |
| 942 | 942 | } else if (function_exists('gzcompress')) { |
| 943 | 943 | $a = @gzcompress($payload); |
@@ -945,14 +945,14 @@ discard block |
||
| 945 | 945 | $payload = $a; |
| 946 | 946 | $encodingHdr = "Content-Encoding: deflate\r\n"; |
| 947 | 947 | } else { |
| 948 | - $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': gzcompress failure in compressing request'); |
|
| 948 | + $this->getLogger()->warning('XML-RPC: '.__METHOD__.': gzcompress failure in compressing request'); |
|
| 949 | 949 | } |
| 950 | 950 | } else { |
| 951 | - $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported by this PHP install'); |
|
| 951 | + $this->getLogger()->warning('XML-RPC: '.__METHOD__.': desired request compression method is unsupported by this PHP install'); |
|
| 952 | 952 | } |
| 953 | 953 | } else { |
| 954 | 954 | if ($opts['request_compression'] != '') { |
| 955 | - $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported'); |
|
| 955 | + $this->getLogger()->warning('XML-RPC: '.__METHOD__.': desired request compression method is unsupported'); |
|
| 956 | 956 | } |
| 957 | 957 | } |
| 958 | 958 | |
@@ -960,16 +960,16 @@ discard block |
||
| 960 | 960 | $credentials = ''; |
| 961 | 961 | if ($opts['username'] != '') { |
| 962 | 962 | if ($opts['authtype'] != 1) { |
| 963 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth is supported with HTTP 1.0'); |
|
| 963 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported with HTTP 1.0'); |
|
| 964 | 964 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['unsupported_option'], |
| 965 | - PhpXmlRpc::$xmlrpcerr['unsupported_option'] . ': only Basic auth is supported with HTTP 1.0'); |
|
| 965 | + PhpXmlRpc::$xmlrpcerr['unsupported_option'].': only Basic auth is supported with HTTP 1.0'); |
|
| 966 | 966 | } |
| 967 | - $credentials = 'Authorization: Basic ' . base64_encode($opts['username'] . ':' . $opts['password']) . "\r\n"; |
|
| 967 | + $credentials = 'Authorization: Basic '.base64_encode($opts['username'].':'.$opts['password'])."\r\n"; |
|
| 968 | 968 | } |
| 969 | 969 | |
| 970 | 970 | $acceptedEncoding = ''; |
| 971 | 971 | if (is_array($opts['accepted_compression']) && count($opts['accepted_compression'])) { |
| 972 | - $acceptedEncoding = 'Accept-Encoding: ' . implode(', ', $opts['accepted_compression']) . "\r\n"; |
|
| 972 | + $acceptedEncoding = 'Accept-Encoding: '.implode(', ', $opts['accepted_compression'])."\r\n"; |
|
| 973 | 973 | } |
| 974 | 974 | |
| 975 | 975 | if ($port == 0) { |
@@ -985,15 +985,15 @@ discard block |
||
| 985 | 985 | $connectPort = $opts['proxyport']; |
| 986 | 986 | $transport = 'tcp'; |
| 987 | 987 | /// @todo check: should we not use https in some cases? |
| 988 | - $uri = 'http://' . $server . ':' . $port . $path; |
|
| 988 | + $uri = 'http://'.$server.':'.$port.$path; |
|
| 989 | 989 | if ($opts['proxy_user'] != '') { |
| 990 | 990 | if ($opts['proxy_authtype'] != 1) { |
| 991 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth to proxy is supported with HTTP 1.0'); |
|
| 991 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported with HTTP 1.0'); |
|
| 992 | 992 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['unsupported_option'], |
| 993 | - PhpXmlRpc::$xmlrpcerr['unsupported_option'] . ': only Basic auth to proxy is supported with HTTP 1.0'); |
|
| 993 | + PhpXmlRpc::$xmlrpcerr['unsupported_option'].': only Basic auth to proxy is supported with HTTP 1.0'); |
|
| 994 | 994 | } |
| 995 | - $proxyCredentials = 'Proxy-Authorization: Basic ' . base64_encode($opts['proxy_user'] . ':' . |
|
| 996 | - $opts['proxy_pass']) . "\r\n"; |
|
| 995 | + $proxyCredentials = 'Proxy-Authorization: Basic '.base64_encode($opts['proxy_user'].':'. |
|
| 996 | + $opts['proxy_pass'])."\r\n"; |
|
| 997 | 997 | } |
| 998 | 998 | } else { |
| 999 | 999 | $connectServer = $server; |
@@ -1009,38 +1009,38 @@ discard block |
||
| 1009 | 1009 | $version = ''; |
| 1010 | 1010 | foreach ($opts['cookies'] as $name => $cookie) { |
| 1011 | 1011 | /// @todo should we sanitize the cookie value on behalf of the user? See setCookie comments |
| 1012 | - $cookieHeader .= ' ' . $name . '=' . $cookie['value'] . ";"; |
|
| 1012 | + $cookieHeader .= ' '.$name.'='.$cookie['value'].";"; |
|
| 1013 | 1013 | } |
| 1014 | - $cookieHeader = 'Cookie:' . $version . substr($cookieHeader, 0, -1) . "\r\n"; |
|
| 1014 | + $cookieHeader = 'Cookie:'.$version.substr($cookieHeader, 0, -1)."\r\n"; |
|
| 1015 | 1015 | } |
| 1016 | 1016 | |
| 1017 | 1017 | $extraHeaders = ''; |
| 1018 | 1018 | if (is_array($this->extra_headers) && $this->extra_headers) { |
| 1019 | - $extraHeaders = implode("\r\n", $this->extra_headers) . "\r\n"; |
|
| 1019 | + $extraHeaders = implode("\r\n", $this->extra_headers)."\r\n"; |
|
| 1020 | 1020 | } |
| 1021 | 1021 | |
| 1022 | 1022 | // omit port if default |
| 1023 | 1023 | if (($port == 80 && in_array($method, array('http', 'http10'))) || ($port == 443 && $method == 'https')) { |
| 1024 | 1024 | $port = ''; |
| 1025 | 1025 | } else { |
| 1026 | - $port = ':' . $port; |
|
| 1027 | - } |
|
| 1028 | - |
|
| 1029 | - $op = 'POST ' . $uri . " HTTP/1.0\r\n" . |
|
| 1030 | - 'User-Agent: ' . $opts['user_agent'] . "\r\n" . |
|
| 1031 | - 'Host: ' . $server . $port . "\r\n" . |
|
| 1032 | - $credentials . |
|
| 1033 | - $proxyCredentials . |
|
| 1034 | - $acceptedEncoding . |
|
| 1035 | - $encodingHdr . |
|
| 1036 | - 'Accept-Charset: ' . implode(',', $opts['accepted_charset_encodings']) . "\r\n" . |
|
| 1037 | - $cookieHeader . |
|
| 1038 | - 'Content-Type: ' . $req->getContentType() . "\r\n" . |
|
| 1039 | - $extraHeaders . |
|
| 1040 | - 'Content-Length: ' . strlen($payload) . "\r\n\r\n" . |
|
| 1026 | + $port = ':'.$port; |
|
| 1027 | + } |
|
| 1028 | + |
|
| 1029 | + $op = 'POST '.$uri." HTTP/1.0\r\n". |
|
| 1030 | + 'User-Agent: '.$opts['user_agent']."\r\n". |
|
| 1031 | + 'Host: '.$server.$port."\r\n". |
|
| 1032 | + $credentials. |
|
| 1033 | + $proxyCredentials. |
|
| 1034 | + $acceptedEncoding. |
|
| 1035 | + $encodingHdr. |
|
| 1036 | + 'Accept-Charset: '.implode(',', $opts['accepted_charset_encodings'])."\r\n". |
|
| 1037 | + $cookieHeader. |
|
| 1038 | + 'Content-Type: '.$req->getContentType()."\r\n". |
|
| 1039 | + $extraHeaders. |
|
| 1040 | + 'Content-Length: '.strlen($payload)."\r\n\r\n". |
|
| 1041 | 1041 | $payload; |
| 1042 | 1042 | |
| 1043 | - if ($opts['debug'] > 1) { |
|
| 1043 | + if ($opts['debug']>1) { |
|
| 1044 | 1044 | $this->getLogger()->debug("---SENDING---\n$op\n---END---"); |
| 1045 | 1045 | } |
| 1046 | 1046 | |
@@ -1066,7 +1066,7 @@ discard block |
||
| 1066 | 1066 | |
| 1067 | 1067 | if ($opts['sslversion'] != 0) { |
| 1068 | 1068 | /// @see https://www.php.net/manual/en/function.curl-setopt.php, https://www.php.net/manual/en/migration56.openssl.php |
| 1069 | - switch($opts['sslversion']) { |
|
| 1069 | + switch ($opts['sslversion']) { |
|
| 1070 | 1070 | /// @todo what does this map to? 1.0-1.3? |
| 1071 | 1071 | //case 1: // TLSv1 |
| 1072 | 1072 | // break; |
@@ -1090,12 +1090,12 @@ discard block |
||
| 1090 | 1090 | $contextOptions['ssl']['crypto_method'] = STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT; |
| 1091 | 1091 | } else { |
| 1092 | 1092 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['unsupported_option'], |
| 1093 | - PhpXmlRpc::$xmlrpcerr['unsupported_option'] . ': TLS-1.3 only is supported with PHP 7.4 or later'); |
|
| 1093 | + PhpXmlRpc::$xmlrpcerr['unsupported_option'].': TLS-1.3 only is supported with PHP 7.4 or later'); |
|
| 1094 | 1094 | } |
| 1095 | 1095 | break; |
| 1096 | 1096 | default: |
| 1097 | 1097 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['unsupported_option'], |
| 1098 | - PhpXmlRpc::$xmlrpcerr['unsupported_option'] . ': Unsupported required TLS version'); |
|
| 1098 | + PhpXmlRpc::$xmlrpcerr['unsupported_option'].': Unsupported required TLS version'); |
|
| 1099 | 1099 | } |
| 1100 | 1100 | } |
| 1101 | 1101 | } |
@@ -1108,7 +1108,7 @@ discard block |
||
| 1108 | 1108 | |
| 1109 | 1109 | $context = stream_context_create($contextOptions); |
| 1110 | 1110 | |
| 1111 | - if ($opts['timeout'] <= 0) { |
|
| 1111 | + if ($opts['timeout']<=0) { |
|
| 1112 | 1112 | $connectTimeout = ini_get('default_socket_timeout'); |
| 1113 | 1113 | } else { |
| 1114 | 1114 | $connectTimeout = $opts['timeout']; |
@@ -1127,7 +1127,7 @@ discard block |
||
| 1127 | 1127 | $fp = stream_socket_client("$transport://$connectServer:$connectPort", $this->errno, $this->errstr, $connectTimeout, |
| 1128 | 1128 | STREAM_CLIENT_CONNECT, $context); |
| 1129 | 1129 | if ($fp) { |
| 1130 | - if ($opts['timeout'] > 0) { |
|
| 1130 | + if ($opts['timeout']>0) { |
|
| 1131 | 1131 | stream_set_timeout($fp, $opts['timeout'], 0); |
| 1132 | 1132 | } |
| 1133 | 1133 | } else { |
@@ -1136,8 +1136,8 @@ discard block |
||
| 1136 | 1136 | $this->errstr = $err['message']; |
| 1137 | 1137 | } |
| 1138 | 1138 | |
| 1139 | - $this->errstr = 'Connect error: ' . $this->errstr; |
|
| 1140 | - return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['http_error'], $this->errstr . ' (' . $this->errno . ')'); |
|
| 1139 | + $this->errstr = 'Connect error: '.$this->errstr; |
|
| 1140 | + return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['http_error'], $this->errstr.' ('.$this->errno.')'); |
|
| 1141 | 1141 | } |
| 1142 | 1142 | |
| 1143 | 1143 | if (!fputs($fp, $op, strlen($op))) { |
@@ -1217,19 +1217,19 @@ discard block |
||
| 1217 | 1217 | $opts['keepalive'], $opts['key'], $opts['keypass'], $opts['sslversion']); |
| 1218 | 1218 | |
| 1219 | 1219 | if (!$curl) { |
| 1220 | - return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'] . |
|
| 1220 | + return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail']. |
|
| 1221 | 1221 | ': error during curl initialization. Check php error log for details'); |
| 1222 | 1222 | } |
| 1223 | 1223 | |
| 1224 | 1224 | $result = curl_exec($curl); |
| 1225 | 1225 | |
| 1226 | - if ($opts['debug'] > 1) { |
|
| 1226 | + if ($opts['debug']>1) { |
|
| 1227 | 1227 | $message = "---CURL INFO---\n"; |
| 1228 | 1228 | foreach (curl_getinfo($curl) as $name => $val) { |
| 1229 | 1229 | if (is_array($val)) { |
| 1230 | 1230 | $val = implode("\n", $val); |
| 1231 | 1231 | } |
| 1232 | - $message .= $name . ': ' . $val . "\n"; |
|
| 1232 | + $message .= $name.': '.$val."\n"; |
|
| 1233 | 1233 | } |
| 1234 | 1234 | $message .= '---END---'; |
| 1235 | 1235 | $this->getLogger()->debug($message); |
@@ -1239,8 +1239,8 @@ discard block |
||
| 1239 | 1239 | /// @todo we should use a better check here - what if we get back '' or '0'? |
| 1240 | 1240 | |
| 1241 | 1241 | $this->errstr = 'no response'; |
| 1242 | - $resp = new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail'] . |
|
| 1243 | - ': ' . curl_error($curl)); |
|
| 1242 | + $resp = new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['curl_fail'], PhpXmlRpc::$xmlrpcstr['curl_fail']. |
|
| 1243 | + ': '.curl_error($curl)); |
|
| 1244 | 1244 | curl_close($curl); |
| 1245 | 1245 | if ($opts['keepalive']) { |
| 1246 | 1246 | $this->xmlrpc_curl_handle = null; |
@@ -1298,7 +1298,7 @@ discard block |
||
| 1298 | 1298 | $payload = $a; |
| 1299 | 1299 | $encodingHdr = 'Content-Encoding: gzip'; |
| 1300 | 1300 | } else { |
| 1301 | - $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': gzencode failure in compressing request'); |
|
| 1301 | + $this->getLogger()->warning('XML-RPC: '.__METHOD__.': gzencode failure in compressing request'); |
|
| 1302 | 1302 | } |
| 1303 | 1303 | } else if (function_exists('gzcompress')) { |
| 1304 | 1304 | $a = @gzcompress($payload); |
@@ -1306,14 +1306,14 @@ discard block |
||
| 1306 | 1306 | $payload = $a; |
| 1307 | 1307 | $encodingHdr = 'Content-Encoding: deflate'; |
| 1308 | 1308 | } else { |
| 1309 | - $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': gzcompress failure in compressing request'); |
|
| 1309 | + $this->getLogger()->warning('XML-RPC: '.__METHOD__.': gzcompress failure in compressing request'); |
|
| 1310 | 1310 | } |
| 1311 | 1311 | } else { |
| 1312 | - $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported by this PHP install'); |
|
| 1312 | + $this->getLogger()->warning('XML-RPC: '.__METHOD__.': desired request compression method is unsupported by this PHP install'); |
|
| 1313 | 1313 | } |
| 1314 | 1314 | } else { |
| 1315 | 1315 | if ($opts['request_compression'] != '') { |
| 1316 | - $this->getLogger()->warning('XML-RPC: ' . __METHOD__ . ': desired request compression method is unsupported'); |
|
| 1316 | + $this->getLogger()->warning('XML-RPC: '.__METHOD__.': desired request compression method is unsupported'); |
|
| 1317 | 1317 | } |
| 1318 | 1318 | } |
| 1319 | 1319 | |
@@ -1327,12 +1327,12 @@ discard block |
||
| 1327 | 1327 | // http, https |
| 1328 | 1328 | $protocol = $method; |
| 1329 | 1329 | if (strpos($protocol, ':') !== false) { |
| 1330 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ": warning - attempted hacking attempt?. The curl protocol requested for the call is: '$protocol'"); |
|
| 1330 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.": warning - attempted hacking attempt?. The curl protocol requested for the call is: '$protocol'"); |
|
| 1331 | 1331 | return false; |
| 1332 | 1332 | } |
| 1333 | 1333 | } |
| 1334 | 1334 | } |
| 1335 | - $curl = curl_init($protocol . '://' . $server . ':' . $port . $path); |
|
| 1335 | + $curl = curl_init($protocol.'://'.$server.':'.$port.$path); |
|
| 1336 | 1336 | if (!$curl) { |
| 1337 | 1337 | return false; |
| 1338 | 1338 | } |
@@ -1346,7 +1346,7 @@ discard block |
||
| 1346 | 1346 | // results into variable |
| 1347 | 1347 | curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
| 1348 | 1348 | |
| 1349 | - if ($opts['debug'] > 1) { |
|
| 1349 | + if ($opts['debug']>1) { |
|
| 1350 | 1350 | curl_setopt($curl, CURLOPT_VERBOSE, true); |
| 1351 | 1351 | /// @todo redirect curlopt_stderr to some stream which can be piped to the logger |
| 1352 | 1352 | } |
@@ -1371,7 +1371,7 @@ discard block |
||
| 1371 | 1371 | } |
| 1372 | 1372 | } |
| 1373 | 1373 | // extra headers |
| 1374 | - $headers = array('Content-Type: ' . $req->getContentType(), 'Accept-Charset: ' . implode(',', $opts['accepted_charset_encodings'])); |
|
| 1374 | + $headers = array('Content-Type: '.$req->getContentType(), 'Accept-Charset: '.implode(',', $opts['accepted_charset_encodings'])); |
|
| 1375 | 1375 | // if no keepalive is wanted, let the server know it in advance |
| 1376 | 1376 | if (!$opts['keepalive']) { |
| 1377 | 1377 | $headers[] = 'Connection: close'; |
@@ -1407,7 +1407,7 @@ discard block |
||
| 1407 | 1407 | if (defined('CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE')) { |
| 1408 | 1408 | curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE); |
| 1409 | 1409 | } else { |
| 1410 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': warning. HTTP2 is not supported by the current PHP/curl install'); |
|
| 1410 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': warning. HTTP2 is not supported by the current PHP/curl install'); |
|
| 1411 | 1411 | curl_close($curl); |
| 1412 | 1412 | return false; |
| 1413 | 1413 | } |
@@ -1418,11 +1418,11 @@ discard block |
||
| 1418 | 1418 | } |
| 1419 | 1419 | |
| 1420 | 1420 | if ($opts['username'] && $opts['password']) { |
| 1421 | - curl_setopt($curl, CURLOPT_USERPWD, $opts['username'] . ':' . $opts['password']); |
|
| 1421 | + curl_setopt($curl, CURLOPT_USERPWD, $opts['username'].':'.$opts['password']); |
|
| 1422 | 1422 | if (defined('CURLOPT_HTTPAUTH')) { |
| 1423 | 1423 | curl_setopt($curl, CURLOPT_HTTPAUTH, $opts['authtype']); |
| 1424 | 1424 | } elseif ($opts['authtype'] != 1) { |
| 1425 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth is supported by the current PHP/curl install'); |
|
| 1425 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported by the current PHP/curl install'); |
|
| 1426 | 1426 | curl_close($curl); |
| 1427 | 1427 | return false; |
| 1428 | 1428 | } |
@@ -1467,13 +1467,13 @@ discard block |
||
| 1467 | 1467 | if ($opts['proxyport'] == 0) { |
| 1468 | 1468 | $opts['proxyport'] = 8080; // NB: even for HTTPS, local connection is on port 8080 |
| 1469 | 1469 | } |
| 1470 | - curl_setopt($curl, CURLOPT_PROXY, $opts['proxy'] . ':' . $opts['proxyport']); |
|
| 1470 | + curl_setopt($curl, CURLOPT_PROXY, $opts['proxy'].':'.$opts['proxyport']); |
|
| 1471 | 1471 | if ($opts['proxy_user']) { |
| 1472 | - curl_setopt($curl, CURLOPT_PROXYUSERPWD, $opts['proxy_user'] . ':' . $opts['proxy_pass']); |
|
| 1472 | + curl_setopt($curl, CURLOPT_PROXYUSERPWD, $opts['proxy_user'].':'.$opts['proxy_pass']); |
|
| 1473 | 1473 | if (defined('CURLOPT_PROXYAUTH')) { |
| 1474 | 1474 | curl_setopt($curl, CURLOPT_PROXYAUTH, $opts['proxy_authtype']); |
| 1475 | 1475 | } elseif ($opts['proxy_authtype'] != 1) { |
| 1476 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth to proxy is supported by the current PHP/curl install'); |
|
| 1476 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported by the current PHP/curl install'); |
|
| 1477 | 1477 | curl_close($curl); |
| 1478 | 1478 | return false; |
| 1479 | 1479 | } |
@@ -1485,7 +1485,7 @@ discard block |
||
| 1485 | 1485 | if (count($opts['cookies'])) { |
| 1486 | 1486 | $cookieHeader = ''; |
| 1487 | 1487 | foreach ($opts['cookies'] as $name => $cookie) { |
| 1488 | - $cookieHeader .= $name . '=' . $cookie['value'] . '; '; |
|
| 1488 | + $cookieHeader .= $name.'='.$cookie['value'].'; '; |
|
| 1489 | 1489 | } |
| 1490 | 1490 | curl_setopt($curl, CURLOPT_COOKIE, substr($cookieHeader, 0, -2)); |
| 1491 | 1491 | } |
@@ -1494,7 +1494,7 @@ discard block |
||
| 1494 | 1494 | curl_setopt($curl, $opt, $val); |
| 1495 | 1495 | } |
| 1496 | 1496 | |
| 1497 | - if ($opts['debug'] > 1) { |
|
| 1497 | + if ($opts['debug']>1) { |
|
| 1498 | 1498 | $this->getLogger()->debug("---SENDING---\n$payload\n---END---"); |
| 1499 | 1499 | } |
| 1500 | 1500 | |
@@ -1595,7 +1595,7 @@ discard block |
||
| 1595 | 1595 | $call['methodName'] = new Value($req->method(), 'string'); |
| 1596 | 1596 | $numParams = $req->getNumParams(); |
| 1597 | 1597 | $params = array(); |
| 1598 | - for ($i = 0; $i < $numParams; $i++) { |
|
| 1598 | + for ($i = 0; $i<$numParams; $i++) { |
|
| 1599 | 1599 | $params[$i] = $req->getParam($i); |
| 1600 | 1600 | } |
| 1601 | 1601 | $call['params'] = new Value($params, 'array'); |
@@ -1617,7 +1617,7 @@ discard block |
||
| 1617 | 1617 | $response = array(); |
| 1618 | 1618 | |
| 1619 | 1619 | if ($this->return_type == 'xml') { |
| 1620 | - for ($i = 0; $i < count($reqs); $i++) { |
|
| 1620 | + for ($i = 0; $i<count($reqs); $i++) { |
|
| 1621 | 1621 | $response[] = new static::$responseClass($rets, 0, '', 'xml', $result->httpResponse()); |
| 1622 | 1622 | } |
| 1623 | 1623 | |
@@ -1625,21 +1625,21 @@ discard block |
||
| 1625 | 1625 | if (!is_array($rets)) { |
| 1626 | 1626 | // bad return type from system.multicall |
| 1627 | 1627 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1628 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ': not an array', 'phpvals', $result->httpResponse()); |
|
| 1628 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].': not an array', 'phpvals', $result->httpResponse()); |
|
| 1629 | 1629 | } |
| 1630 | 1630 | $numRets = count($rets); |
| 1631 | 1631 | if ($numRets != count($reqs)) { |
| 1632 | 1632 | // wrong number of return values. |
| 1633 | 1633 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1634 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ': incorrect number of responses', 'phpvals', |
|
| 1634 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].': incorrect number of responses', 'phpvals', |
|
| 1635 | 1635 | $result->httpResponse()); |
| 1636 | 1636 | } |
| 1637 | 1637 | |
| 1638 | - for ($i = 0; $i < $numRets; $i++) { |
|
| 1638 | + for ($i = 0; $i<$numRets; $i++) { |
|
| 1639 | 1639 | $val = $rets[$i]; |
| 1640 | 1640 | if (!is_array($val)) { |
| 1641 | 1641 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1642 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i is not an array or struct", |
|
| 1642 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i is not an array or struct", |
|
| 1643 | 1643 | 'phpvals', $result->httpResponse()); |
| 1644 | 1644 | } |
| 1645 | 1645 | switch (count($val)) { |
@@ -1647,7 +1647,7 @@ discard block |
||
| 1647 | 1647 | if (!isset($val[0])) { |
| 1648 | 1648 | // Bad value |
| 1649 | 1649 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1650 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has no value", |
|
| 1650 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has no value", |
|
| 1651 | 1651 | 'phpvals', $result->httpResponse()); |
| 1652 | 1652 | } |
| 1653 | 1653 | // Normal return value |
@@ -1659,20 +1659,20 @@ discard block |
||
| 1659 | 1659 | if (!is_int($code)) { |
| 1660 | 1660 | /// @todo should we check that it is != 0? |
| 1661 | 1661 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1662 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no faultCode", |
|
| 1662 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no faultCode", |
|
| 1663 | 1663 | 'phpvals', $result->httpResponse()); |
| 1664 | 1664 | } |
| 1665 | 1665 | $str = @$val['faultString']; |
| 1666 | 1666 | if (!is_string($str)) { |
| 1667 | 1667 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1668 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no FaultString", |
|
| 1668 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no FaultString", |
|
| 1669 | 1669 | 'phpvals', $result->httpResponse()); |
| 1670 | 1670 | } |
| 1671 | 1671 | $response[$i] = new static::$responseClass(0, $code, $str, 'phpvals', $result->httpResponse()); |
| 1672 | 1672 | break; |
| 1673 | 1673 | default: |
| 1674 | 1674 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1675 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has too many items", |
|
| 1675 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has too many items", |
|
| 1676 | 1676 | 'phpvals', $result->httpResponse()); |
| 1677 | 1677 | } |
| 1678 | 1678 | } |
@@ -1681,14 +1681,14 @@ discard block |
||
| 1681 | 1681 | // return type == 'xmlrpcvals' |
| 1682 | 1682 | if ($rets->kindOf() != 'array') { |
| 1683 | 1683 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1684 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i is not an array", 'xmlrpcvals', |
|
| 1684 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i is not an array", 'xmlrpcvals', |
|
| 1685 | 1685 | $result->httpResponse()); |
| 1686 | 1686 | } |
| 1687 | 1687 | $numRets = $rets->count(); |
| 1688 | 1688 | if ($numRets != count($reqs)) { |
| 1689 | 1689 | // wrong number of return values. |
| 1690 | 1690 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1691 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ': incorrect number of responses', 'xmlrpcvals', |
|
| 1691 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].': incorrect number of responses', 'xmlrpcvals', |
|
| 1692 | 1692 | $result->httpResponse()); |
| 1693 | 1693 | } |
| 1694 | 1694 | |
@@ -1697,7 +1697,7 @@ discard block |
||
| 1697 | 1697 | case 'array': |
| 1698 | 1698 | if ($val->count() != 1) { |
| 1699 | 1699 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1700 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has too many items", |
|
| 1700 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has too many items", |
|
| 1701 | 1701 | 'phpvals', $result->httpResponse()); |
| 1702 | 1702 | } |
| 1703 | 1703 | // Normal return value |
@@ -1706,28 +1706,28 @@ discard block |
||
| 1706 | 1706 | case 'struct': |
| 1707 | 1707 | if ($val->count() != 2) { |
| 1708 | 1708 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1709 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has too many items", |
|
| 1709 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has too many items", |
|
| 1710 | 1710 | 'phpvals', $result->httpResponse()); |
| 1711 | 1711 | } |
| 1712 | 1712 | /** @var Value $code */ |
| 1713 | 1713 | $code = $val['faultCode']; |
| 1714 | 1714 | if ($code->kindOf() != 'scalar' || $code->scalarTyp() != 'int') { |
| 1715 | 1715 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1716 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no faultCode", |
|
| 1716 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no faultCode", |
|
| 1717 | 1717 | 'xmlrpcvals', $result->httpResponse()); |
| 1718 | 1718 | } |
| 1719 | 1719 | /** @var Value $str */ |
| 1720 | 1720 | $str = $val['faultString']; |
| 1721 | 1721 | if ($str->kindOf() != 'scalar' || $str->scalarTyp() != 'string') { |
| 1722 | 1722 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1723 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i has invalid or no faultCode", |
|
| 1723 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i has invalid or no faultCode", |
|
| 1724 | 1724 | 'xmlrpcvals', $result->httpResponse()); |
| 1725 | 1725 | } |
| 1726 | 1726 | $response[] = new static::$responseClass(0, $code->scalarVal(), $str->scalarVal(), 'xmlrpcvals', $result->httpResponse()); |
| 1727 | 1727 | break; |
| 1728 | 1728 | default: |
| 1729 | 1729 | return new static::$responseClass(0, PhpXmlRpc::$xmlrpcerr['multicall_error'], |
| 1730 | - PhpXmlRpc::$xmlrpcstr['multicall_error'] . ": response element $i is not an array or struct", |
|
| 1730 | + PhpXmlRpc::$xmlrpcstr['multicall_error'].": response element $i is not an array or struct", |
|
| 1731 | 1731 | 'xmlrpcvals', $result->httpResponse()); |
| 1732 | 1732 | } |
| 1733 | 1733 | } |
@@ -1760,7 +1760,7 @@ discard block |
||
| 1760 | 1760 | $authType = 1, $proxyHost = '', $proxyPort = 0, $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, |
| 1761 | 1761 | $method = 'http') |
| 1762 | 1762 | { |
| 1763 | - $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated'); |
|
| 1763 | + $this->logDeprecation('Method '.__METHOD__.' is deprecated'); |
|
| 1764 | 1764 | |
| 1765 | 1765 | return $this->sendPayloadSocket($req, $server, $port, $timeout, $username, $password, $authType, null, null, |
| 1766 | 1766 | null, null, $proxyHost, $proxyPort, $proxyUsername, $proxyPassword, $proxyAuthType, $method); |
@@ -1796,7 +1796,7 @@ discard block |
||
| 1796 | 1796 | $proxyUsername = '', $proxyPassword = '', $proxyAuthType = 1, $keepAlive = false, $key = '', $keyPass = '', |
| 1797 | 1797 | $sslVersion = 0) |
| 1798 | 1798 | { |
| 1799 | - $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated'); |
|
| 1799 | + $this->logDeprecation('Method '.__METHOD__.' is deprecated'); |
|
| 1800 | 1800 | |
| 1801 | 1801 | return $this->sendPayloadCURL($req, $server, $port, $timeout, $username, |
| 1802 | 1802 | $password, $authType, $cert, $certPass, $caCert, $caCertDir, $proxyHost, $proxyPort, |
@@ -2009,7 +2009,7 @@ discard block |
||
| 2009 | 2009 | public function &__get($name) |
| 2010 | 2010 | { |
| 2011 | 2011 | if (in_array($name, static::$options)) { |
| 2012 | - $this->logDeprecation('Getting property Client::' . $name . ' is deprecated'); |
|
| 2012 | + $this->logDeprecation('Getting property Client::'.$name.' is deprecated'); |
|
| 2013 | 2013 | return $this->$name; |
| 2014 | 2014 | } |
| 2015 | 2015 | |
@@ -2020,12 +2020,12 @@ discard block |
||
| 2020 | 2020 | case 'server': |
| 2021 | 2021 | case 'port': |
| 2022 | 2022 | case 'path': |
| 2023 | - $this->logDeprecation('Getting property Client::' . $name . ' is deprecated'); |
|
| 2023 | + $this->logDeprecation('Getting property Client::'.$name.' is deprecated'); |
|
| 2024 | 2024 | return $this->$name; |
| 2025 | 2025 | default: |
| 2026 | 2026 | /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout... |
| 2027 | 2027 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
| 2028 | - trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING); |
|
| 2028 | + trigger_error('Undefined property via __get(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING); |
|
| 2029 | 2029 | $result = null; |
| 2030 | 2030 | return $result; |
| 2031 | 2031 | } |
@@ -2034,7 +2034,7 @@ discard block |
||
| 2034 | 2034 | public function __set($name, $value) |
| 2035 | 2035 | { |
| 2036 | 2036 | if (in_array($name, static::$options)) { |
| 2037 | - $this->logDeprecation('Setting property Client::' . $name . ' is deprecated'); |
|
| 2037 | + $this->logDeprecation('Setting property Client::'.$name.' is deprecated'); |
|
| 2038 | 2038 | $this->$name = $value; |
| 2039 | 2039 | return; |
| 2040 | 2040 | } |
@@ -2046,20 +2046,20 @@ discard block |
||
| 2046 | 2046 | case 'server': |
| 2047 | 2047 | case 'port': |
| 2048 | 2048 | case 'path': |
| 2049 | - $this->logDeprecation('Setting property Client::' . $name . ' is deprecated'); |
|
| 2049 | + $this->logDeprecation('Setting property Client::'.$name.' is deprecated'); |
|
| 2050 | 2050 | $this->$name = $value; |
| 2051 | 2051 | return; |
| 2052 | 2052 | default: |
| 2053 | 2053 | /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout... |
| 2054 | 2054 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
| 2055 | - trigger_error('Undefined property via __set(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING); |
|
| 2055 | + trigger_error('Undefined property via __set(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING); |
|
| 2056 | 2056 | } |
| 2057 | 2057 | } |
| 2058 | 2058 | |
| 2059 | 2059 | public function __isset($name) |
| 2060 | 2060 | { |
| 2061 | 2061 | if (in_array($name, static::$options)) { |
| 2062 | - $this->logDeprecation('Checking property Client::' . $name . ' is deprecated'); |
|
| 2062 | + $this->logDeprecation('Checking property Client::'.$name.' is deprecated'); |
|
| 2063 | 2063 | return isset($this->$name); |
| 2064 | 2064 | } |
| 2065 | 2065 | |
@@ -2070,7 +2070,7 @@ discard block |
||
| 2070 | 2070 | case 'server': |
| 2071 | 2071 | case 'port': |
| 2072 | 2072 | case 'path': |
| 2073 | - $this->logDeprecation('Checking property Client::' . $name . ' is deprecated'); |
|
| 2073 | + $this->logDeprecation('Checking property Client::'.$name.' is deprecated'); |
|
| 2074 | 2074 | return isset($this->$name); |
| 2075 | 2075 | default: |
| 2076 | 2076 | return false; |
@@ -2080,7 +2080,7 @@ discard block |
||
| 2080 | 2080 | public function __unset($name) |
| 2081 | 2081 | { |
| 2082 | 2082 | if (in_array($name, static::$options)) { |
| 2083 | - $this->logDeprecation('Unsetting property Client::' . $name . ' is deprecated'); |
|
| 2083 | + $this->logDeprecation('Unsetting property Client::'.$name.' is deprecated'); |
|
| 2084 | 2084 | unset($this->$name); |
| 2085 | 2085 | return; |
| 2086 | 2086 | } |
@@ -2092,13 +2092,13 @@ discard block |
||
| 2092 | 2092 | case 'server': |
| 2093 | 2093 | case 'port': |
| 2094 | 2094 | case 'path': |
| 2095 | - $this->logDeprecation('Unsetting property Client::' . $name . ' is deprecated'); |
|
| 2095 | + $this->logDeprecation('Unsetting property Client::'.$name.' is deprecated'); |
|
| 2096 | 2096 | unset($this->$name); |
| 2097 | 2097 | return; |
| 2098 | 2098 | default: |
| 2099 | 2099 | /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout... |
| 2100 | 2100 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
| 2101 | - trigger_error('Undefined property via __unset(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING); |
|
| 2101 | + trigger_error('Undefined property via __unset(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING); |
|
| 2102 | 2102 | } |
| 2103 | 2103 | } |
| 2104 | 2104 | } |