@@ -187,12 +187,12 @@ discard block |
||
| 187 | 187 | // q: can php be built without ctype? should we use a regexp? |
| 188 | 188 | if (is_string($key) && !ctype_digit($key)) { |
| 189 | 189 | /// @todo on invalid options, throw/error-out instead of logging an error message? |
| 190 | - switch($key) { |
|
| 190 | + switch ($key) { |
|
| 191 | 191 | case 'target_charset': |
| 192 | 192 | if (function_exists('mb_convert_encoding')) { |
| 193 | 193 | $this->current_parsing_options['target_charset'] = $val; |
| 194 | 194 | } else { |
| 195 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ": 'target_charset' option is unsupported without mbstring"); |
|
| 195 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.": 'target_charset' option is unsupported without mbstring"); |
|
| 196 | 196 | } |
| 197 | 197 | break; |
| 198 | 198 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | if (is_callable($val)) { |
| 201 | 201 | $this->current_parsing_options['methodname_callback'] = $val; |
| 202 | 202 | } else { |
| 203 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ": Callback passed as 'methodname_callback' is not callable"); |
|
| 203 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.": Callback passed as 'methodname_callback' is not callable"); |
|
| 204 | 204 | } |
| 205 | 205 | break; |
| 206 | 206 | |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | break; |
| 212 | 212 | |
| 213 | 213 | default: |
| 214 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ": unsupported option: $key"); |
|
| 214 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.": unsupported option: $key"); |
|
| 215 | 215 | } |
| 216 | 216 | unset($mergedOptions[$key]); |
| 217 | 217 | } |
@@ -257,10 +257,10 @@ discard block |
||
| 257 | 257 | |
| 258 | 258 | try { |
| 259 | 259 | // @see ticket #70 - we have to parse big xml docs in chunks to avoid errors |
| 260 | - for ($offset = 0; $offset < $len; $offset += $this->maxChunkLength) { |
|
| 260 | + for ($offset = 0; $offset<$len; $offset += $this->maxChunkLength) { |
|
| 261 | 261 | $chunk = substr($data, $offset, $this->maxChunkLength); |
| 262 | 262 | // error handling: xml not well formed |
| 263 | - if (!xml_parse($parser, $chunk, $offset + $this->maxChunkLength >= $len)) { |
|
| 263 | + if (!xml_parse($parser, $chunk, $offset+$this->maxChunkLength>=$len)) { |
|
| 264 | 264 | $errCode = xml_get_error_code($parser); |
| 265 | 265 | $errStr = sprintf('XML error %s: %s at line %d, column %d', $errCode, xml_error_string($errCode), |
| 266 | 266 | xml_get_current_line_number($parser), xml_get_current_column_number($parser)); |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | $this->_xh['isf_reason'] = $errStr; |
| 270 | 270 | } |
| 271 | 271 | // no need to parse further if we already have a fatal error |
| 272 | - if ($this->_xh['isf'] >= 2) { |
|
| 272 | + if ($this->_xh['isf']>=2) { |
|
| 273 | 273 | break; |
| 274 | 274 | } |
| 275 | 275 | } |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | public function xmlrpc_se($parser, $name, $attrs, $acceptSingleVals = false) |
| 315 | 315 | { |
| 316 | 316 | // if invalid xml-rpc already detected, skip all processing |
| 317 | - if ($this->_xh['isf'] >= 2) { |
|
| 317 | + if ($this->_xh['isf']>=2) { |
|
| 318 | 318 | return; |
| 319 | 319 | } |
| 320 | 320 | |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | if ($acceptSingleVals === false) { |
| 329 | 329 | $accept = $this->current_parsing_options['accept']; |
| 330 | 330 | } else { |
| 331 | - $this->logDeprecation('Using argument $acceptSingleVals for method ' . __METHOD__ . ' is deprecated'); |
|
| 331 | + $this->logDeprecation('Using argument $acceptSingleVals for method '.__METHOD__.' is deprecated'); |
|
| 332 | 332 | $accept = self::ACCEPT_REQUEST | self::ACCEPT_RESPONSE | self::ACCEPT_VALUE; |
| 333 | 333 | } |
| 334 | 334 | if (($name == 'METHODCALL' && ($accept & self::ACCEPT_REQUEST)) || |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | $this->_xh['rt'] = strtolower($name); |
| 339 | 339 | } else { |
| 340 | 340 | $this->_xh['isf'] = 2; |
| 341 | - $this->_xh['isf_reason'] = 'missing top level xmlrpc element. Found: ' . $name; |
|
| 341 | + $this->_xh['isf_reason'] = 'missing top level xmlrpc element. Found: '.$name; |
|
| 342 | 342 | |
| 343 | 343 | return; |
| 344 | 344 | } |
@@ -443,7 +443,7 @@ discard block |
||
| 443 | 443 | |
| 444 | 444 | case 'MEMBER': |
| 445 | 445 | // set member name to null, in case we do not find in the xml later on |
| 446 | - $this->_xh['valuestack'][count($this->_xh['valuestack']) - 1]['name'] = null; |
|
| 446 | + $this->_xh['valuestack'][count($this->_xh['valuestack'])-1]['name'] = null; |
|
| 447 | 447 | //$this->_xh['ac']=''; |
| 448 | 448 | // Drop trough intentionally |
| 449 | 449 | |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | */ |
| 507 | 507 | public function xmlrpc_ee($parser, $name, $rebuildXmlrpcvals = 1) |
| 508 | 508 | { |
| 509 | - if ($this->_xh['isf'] >= 2) { |
|
| 509 | + if ($this->_xh['isf']>=2) { |
|
| 510 | 510 | return; |
| 511 | 511 | } |
| 512 | 512 | |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | $this->_xh['value'] = mb_convert_encoding($this->_xh['value'], $this->current_parsing_options['target_charset'], 'UTF-8'); |
| 529 | 529 | } |
| 530 | 530 | |
| 531 | - if ($rebuildXmlrpcvals > 0) { |
|
| 531 | + if ($rebuildXmlrpcvals>0) { |
|
| 532 | 532 | // build the xml-rpc val out of the data received, and substitute it |
| 533 | 533 | $temp = new Value($this->_xh['value'], $this->_xh['vt']); |
| 534 | 534 | // in case we got info about underlying php class, save it in the object we're rebuilding |
@@ -536,15 +536,15 @@ discard block |
||
| 536 | 536 | $temp->_php_class = $this->_xh['php_class']; |
| 537 | 537 | } |
| 538 | 538 | $this->_xh['value'] = $temp; |
| 539 | - } elseif ($rebuildXmlrpcvals < 0) { |
|
| 539 | + } elseif ($rebuildXmlrpcvals<0) { |
|
| 540 | 540 | if ($this->_xh['vt'] == Value::$xmlrpcDateTime) { |
| 541 | - $this->_xh['value'] = (object)array( |
|
| 541 | + $this->_xh['value'] = (object) array( |
|
| 542 | 542 | 'xmlrpc_type' => 'datetime', |
| 543 | 543 | 'scalar' => $this->_xh['value'], |
| 544 | 544 | 'timestamp' => \PhpXmlRpc\Helper\Date::iso8601Decode($this->_xh['value']) |
| 545 | 545 | ); |
| 546 | 546 | } elseif ($this->_xh['vt'] == Value::$xmlrpcBase64) { |
| 547 | - $this->_xh['value'] = (object)array( |
|
| 547 | + $this->_xh['value'] = (object) array( |
|
| 548 | 548 | 'xmlrpc_type' => 'base64', |
| 549 | 549 | 'scalar' => $this->_xh['value'] |
| 550 | 550 | ); |
@@ -559,8 +559,8 @@ discard block |
||
| 559 | 559 | // check if we are inside an array or struct: |
| 560 | 560 | // if value just built is inside an array, let's move it into array on the stack |
| 561 | 561 | $vscount = count($this->_xh['valuestack']); |
| 562 | - if ($vscount && $this->_xh['valuestack'][$vscount - 1]['type'] == 'ARRAY') { |
|
| 563 | - $this->_xh['valuestack'][$vscount - 1]['values'][] = $this->_xh['value']; |
|
| 562 | + if ($vscount && $this->_xh['valuestack'][$vscount-1]['type'] == 'ARRAY') { |
|
| 563 | + $this->_xh['valuestack'][$vscount-1]['values'][] = $this->_xh['value']; |
|
| 564 | 564 | } |
| 565 | 565 | break; |
| 566 | 566 | |
@@ -587,7 +587,7 @@ discard block |
||
| 587 | 587 | // log if receiving something strange, even though we set the value to false anyway |
| 588 | 588 | /// @todo to be consistent with the other types, we should return a value outside the good-value domain, e.g. NULL |
| 589 | 589 | if ($this->_xh['ac'] != '0' && strcasecmp($this->_xh['ac'], 'false') !== 0) { |
| 590 | - if (!$this->handleParsingError('invalid data received in BOOLEAN value: ' . |
|
| 590 | + if (!$this->handleParsingError('invalid data received in BOOLEAN value: '. |
|
| 591 | 591 | $this->truncateValueForLog($this->_xh['ac']), __METHOD__)) { |
| 592 | 592 | return; |
| 593 | 593 | } |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | $this->_xh['vt'] = strtolower($name); |
| 608 | 608 | $this->_xh['lv'] = 3; // indicate we've found a value |
| 609 | 609 | if (!preg_match(PhpXmlRpc::$xmlrpc_int_format, $this->_xh['ac'])) { |
| 610 | - if (!$this->handleParsingError('non numeric data received in INT value: ' . |
|
| 610 | + if (!$this->handleParsingError('non numeric data received in INT value: '. |
|
| 611 | 611 | $this->truncateValueForLog($this->_xh['ac']), __METHOD__)) { |
| 612 | 612 | return; |
| 613 | 613 | } |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | $this->_xh['value'] = 'ERROR_NON_NUMERIC_FOUND'; |
| 616 | 616 | } else { |
| 617 | 617 | // it's ok, add it on |
| 618 | - $this->_xh['value'] = (int)$this->_xh['ac']; |
|
| 618 | + $this->_xh['value'] = (int) $this->_xh['ac']; |
|
| 619 | 619 | } |
| 620 | 620 | break; |
| 621 | 621 | |
@@ -623,7 +623,7 @@ discard block |
||
| 623 | 623 | $this->_xh['vt'] = Value::$xmlrpcDouble; |
| 624 | 624 | $this->_xh['lv'] = 3; // indicate we've found a value |
| 625 | 625 | if (!preg_match(PhpXmlRpc::$xmlrpc_double_format, $this->_xh['ac'])) { |
| 626 | - if (!$this->handleParsingError('non numeric data received in DOUBLE value: ' . |
|
| 626 | + if (!$this->handleParsingError('non numeric data received in DOUBLE value: '. |
|
| 627 | 627 | $this->truncateValueForLog($this->_xh['ac']), __METHOD__)) { |
| 628 | 628 | return; |
| 629 | 629 | } |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | $this->_xh['value'] = 'ERROR_NON_NUMERIC_FOUND'; |
| 632 | 632 | } else { |
| 633 | 633 | // it's ok, add it on |
| 634 | - $this->_xh['value'] = (double)$this->_xh['ac']; |
|
| 634 | + $this->_xh['value'] = (double) $this->_xh['ac']; |
|
| 635 | 635 | } |
| 636 | 636 | break; |
| 637 | 637 | |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | $this->_xh['vt'] = Value::$xmlrpcDateTime; |
| 640 | 640 | $this->_xh['lv'] = 3; // indicate we've found a value |
| 641 | 641 | if (!preg_match(PhpXmlRpc::$xmlrpc_datetime_format, $this->_xh['ac'])) { |
| 642 | - if (!$this->handleParsingError('invalid data received in DATETIME value: ' . |
|
| 642 | + if (!$this->handleParsingError('invalid data received in DATETIME value: '. |
|
| 643 | 643 | $this->truncateValueForLog($this->_xh['ac']), __METHOD__)) { |
| 644 | 644 | return; |
| 645 | 645 | } |
@@ -650,9 +650,9 @@ discard block |
||
| 650 | 650 | |
| 651 | 651 | // the default regex used to validate the date string a few lines above should make this case impossible, |
| 652 | 652 | // but one never knows... |
| 653 | - } catch(\Exception $e) { |
|
| 653 | + } catch (\Exception $e) { |
|
| 654 | 654 | // what to do? We can not guarantee that a valid date can be created. We return null... |
| 655 | - if (!$this->handleParsingError('invalid data received in DATETIME value. Error ' . |
|
| 655 | + if (!$this->handleParsingError('invalid data received in DATETIME value. Error '. |
|
| 656 | 656 | $e->getMessage(), __METHOD__)) { |
| 657 | 657 | return; |
| 658 | 658 | } |
@@ -669,14 +669,14 @@ discard block |
||
| 669 | 669 | $v = base64_decode($this->_xh['ac'], true); |
| 670 | 670 | if ($v === false) { |
| 671 | 671 | $this->_xh['isf'] = 2; |
| 672 | - $this->_xh['isf_reason'] = 'Invalid data received in BASE64 value: '. $this->truncateValueForLog($this->_xh['ac']); |
|
| 672 | + $this->_xh['isf_reason'] = 'Invalid data received in BASE64 value: '.$this->truncateValueForLog($this->_xh['ac']); |
|
| 673 | 673 | return; |
| 674 | 674 | } |
| 675 | 675 | } else { |
| 676 | 676 | $v = base64_decode($this->_xh['ac']); |
| 677 | 677 | if ($v === '' && $this->_xh['ac'] !== '') { |
| 678 | 678 | // only the empty string should decode to the empty string |
| 679 | - $this->getLogger()->error('XML-RPC: ' . __METHOD__ . ': invalid data received in BASE64 value: ' . |
|
| 679 | + $this->getLogger()->error('XML-RPC: '.__METHOD__.': invalid data received in BASE64 value: '. |
|
| 680 | 680 | $this->truncateValueForLog($this->_xh['ac'])); |
| 681 | 681 | } |
| 682 | 682 | } |
@@ -684,20 +684,20 @@ discard block |
||
| 684 | 684 | break; |
| 685 | 685 | |
| 686 | 686 | case 'NAME': |
| 687 | - $this->_xh['valuestack'][count($this->_xh['valuestack']) - 1]['name'] = $this->_xh['ac']; |
|
| 687 | + $this->_xh['valuestack'][count($this->_xh['valuestack'])-1]['name'] = $this->_xh['ac']; |
|
| 688 | 688 | break; |
| 689 | 689 | |
| 690 | 690 | case 'MEMBER': |
| 691 | 691 | // add to array in the stack the last element built, unless no VALUE or no NAME were found |
| 692 | 692 | if ($this->_xh['vt']) { |
| 693 | 693 | $vscount = count($this->_xh['valuestack']); |
| 694 | - if ($this->_xh['valuestack'][$vscount - 1]['name'] === null) { |
|
| 694 | + if ($this->_xh['valuestack'][$vscount-1]['name'] === null) { |
|
| 695 | 695 | if (!$this->handleParsingError('missing NAME inside STRUCT in received xml', __METHOD__)) { |
| 696 | 696 | return; |
| 697 | 697 | } |
| 698 | - $this->_xh['valuestack'][$vscount - 1]['name'] = ''; |
|
| 698 | + $this->_xh['valuestack'][$vscount-1]['name'] = ''; |
|
| 699 | 699 | } |
| 700 | - $this->_xh['valuestack'][$vscount - 1]['values'][$this->_xh['valuestack'][$vscount - 1]['name']] = $this->_xh['value']; |
|
| 700 | + $this->_xh['valuestack'][$vscount-1]['values'][$this->_xh['valuestack'][$vscount-1]['name']] = $this->_xh['value']; |
|
| 701 | 701 | } else { |
| 702 | 702 | if (!$this->handleParsingError('missing VALUE inside STRUCT in received xml', __METHOD__)) { |
| 703 | 703 | return; |
@@ -828,7 +828,7 @@ discard block |
||
| 828 | 828 | public function xmlrpc_cd($parser, $data) |
| 829 | 829 | { |
| 830 | 830 | // skip processing if xml fault already detected |
| 831 | - if ($this->_xh['isf'] >= 2) { |
|
| 831 | + if ($this->_xh['isf']>=2) { |
|
| 832 | 832 | return; |
| 833 | 833 | } |
| 834 | 834 | |
@@ -850,7 +850,7 @@ discard block |
||
| 850 | 850 | public function xmlrpc_dh($parser, $data) |
| 851 | 851 | { |
| 852 | 852 | // skip processing if xml fault already detected |
| 853 | - if ($this->_xh['isf'] >= 2) { |
|
| 853 | + if ($this->_xh['isf']>=2) { |
|
| 854 | 854 | return; |
| 855 | 855 | } |
| 856 | 856 | |
@@ -930,8 +930,8 @@ discard block |
||
| 930 | 930 | // SPACE: (#x20 | #x9 | #xD | #xA)+ === [ \x9\xD\xA]+ |
| 931 | 931 | // EQ: SPACE?=SPACE? === [ \x9\xD\xA]*=[ \x9\xD\xA]* |
| 932 | 932 | // We could be stricter on version number: VersionNum ::= '1.' [0-9]+ |
| 933 | - if (preg_match('/^<\?xml\s+version\s*=\s*' . "((?:\"[a-zA-Z0-9_.:-]+\")|(?:'[a-zA-Z0-9_.:-]+'))" . |
|
| 934 | - '\s+encoding\s*=\s*' . "((?:\"[A-Za-z][A-Za-z0-9._-]*\")|(?:'[A-Za-z][A-Za-z0-9._-]*'))/", |
|
| 933 | + if (preg_match('/^<\?xml\s+version\s*=\s*'."((?:\"[a-zA-Z0-9_.:-]+\")|(?:'[a-zA-Z0-9_.:-]+'))". |
|
| 934 | + '\s+encoding\s*=\s*'."((?:\"[A-Za-z][A-Za-z0-9._-]*\")|(?:'[A-Za-z][A-Za-z0-9._-]*'))/", |
|
| 935 | 935 | $xmlChunk, $matches)) { |
| 936 | 936 | return strtoupper(substr($matches[2], 1, -1)); |
| 937 | 937 | } |
@@ -949,7 +949,7 @@ discard block |
||
| 949 | 949 | // NB: mb_detect likes to call it ascii, xml parser likes to call it US_ASCII... |
| 950 | 950 | // IANA also likes better US-ASCII, so go with it |
| 951 | 951 | if ($enc == 'ASCII') { |
| 952 | - $enc = 'US-' . $enc; |
|
| 952 | + $enc = 'US-'.$enc; |
|
| 953 | 953 | } |
| 954 | 954 | |
| 955 | 955 | return $enc; |
@@ -990,8 +990,8 @@ discard block |
||
| 990 | 990 | // SPACE: (#x20 | #x9 | #xD | #xA)+ === [ \x9\xD\xA]+ |
| 991 | 991 | // EQ: SPACE?=SPACE? === [ \x9\xD\xA]*=[ \x9\xD\xA]* |
| 992 | 992 | // We could be stricter on version number: VersionNum ::= '1.' [0-9]+ |
| 993 | - if (preg_match('/^<\?xml\s+version\s*=\s*' . "((?:\"[a-zA-Z0-9_.:-]+\")|(?:'[a-zA-Z0-9_.:-]+'))" . |
|
| 994 | - '\s+encoding\s*=\s*' . "((?:\"[A-Za-z][A-Za-z0-9._-]*\")|(?:'[A-Za-z][A-Za-z0-9._-]*'))/", |
|
| 993 | + if (preg_match('/^<\?xml\s+version\s*=\s*'."((?:\"[a-zA-Z0-9_.:-]+\")|(?:'[a-zA-Z0-9_.:-]+'))". |
|
| 994 | + '\s+encoding\s*=\s*'."((?:\"[A-Za-z][A-Za-z0-9._-]*\")|(?:'[A-Za-z][A-Za-z0-9._-]*'))/", |
|
| 995 | 995 | $xmlChunk)) { |
| 996 | 996 | return true; |
| 997 | 997 | } |
@@ -1011,7 +1011,7 @@ discard block |
||
| 1011 | 1011 | $this->_xh['isf_reason'] = ucfirst($message); |
| 1012 | 1012 | return false; |
| 1013 | 1013 | } else { |
| 1014 | - $this->getLogger()->error('XML-RPC: ' . ($method != '' ? $method . ': ' : '') . $message); |
|
| 1014 | + $this->getLogger()->error('XML-RPC: '.($method != '' ? $method.': ' : '').$message); |
|
| 1015 | 1015 | return true; |
| 1016 | 1016 | } |
| 1017 | 1017 | } |
@@ -1023,8 +1023,8 @@ discard block |
||
| 1023 | 1023 | */ |
| 1024 | 1024 | protected function truncateValueForLog($data) |
| 1025 | 1025 | { |
| 1026 | - if (strlen($data) > $this->maxLogValueLength) { |
|
| 1027 | - return substr($data, 0, $this->maxLogValueLength - 3) . '...'; |
|
| 1026 | + if (strlen($data)>$this->maxLogValueLength) { |
|
| 1027 | + return substr($data, 0, $this->maxLogValueLength-3).'...'; |
|
| 1028 | 1028 | } |
| 1029 | 1029 | |
| 1030 | 1030 | return $data; |
@@ -1045,7 +1045,7 @@ discard block |
||
| 1045 | 1045 | public function xmlrpc_se_any($parser, $name, $attrs) |
| 1046 | 1046 | { |
| 1047 | 1047 | // this will be spamming the log if this method is in use... |
| 1048 | - $this->logDeprecation('Method ' . __METHOD__ . ' is deprecated'); |
|
| 1048 | + $this->logDeprecation('Method '.__METHOD__.' is deprecated'); |
|
| 1049 | 1049 | |
| 1050 | 1050 | $this->xmlrpc_se($parser, $name, $attrs, true); |
| 1051 | 1051 | } |
@@ -1055,12 +1055,12 @@ discard block |
||
| 1055 | 1055 | switch ($name) { |
| 1056 | 1056 | case '_xh': |
| 1057 | 1057 | case 'xmlrpc_valid_parents': |
| 1058 | - $this->logDeprecation('Getting property XMLParser::' . $name . ' is deprecated'); |
|
| 1058 | + $this->logDeprecation('Getting property XMLParser::'.$name.' is deprecated'); |
|
| 1059 | 1059 | return $this->$name; |
| 1060 | 1060 | default: |
| 1061 | 1061 | /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout... |
| 1062 | 1062 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
| 1063 | - trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING); |
|
| 1063 | + trigger_error('Undefined property via __get(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING); |
|
| 1064 | 1064 | $result = null; |
| 1065 | 1065 | return $result; |
| 1066 | 1066 | } |
@@ -1071,18 +1071,18 @@ discard block |
||
| 1071 | 1071 | switch ($name) { |
| 1072 | 1072 | // this should only ever be called by subclasses which overtook `parse()` |
| 1073 | 1073 | case 'accept': |
| 1074 | - $this->logDeprecation('Setting property XMLParser::' . $name . ' is deprecated'); |
|
| 1074 | + $this->logDeprecation('Setting property XMLParser::'.$name.' is deprecated'); |
|
| 1075 | 1075 | $this->current_parsing_options['accept'] = $value; |
| 1076 | 1076 | break; |
| 1077 | 1077 | case '_xh': |
| 1078 | 1078 | case 'xmlrpc_valid_parents': |
| 1079 | - $this->logDeprecation('Setting property XMLParser::' . $name . ' is deprecated'); |
|
| 1079 | + $this->logDeprecation('Setting property XMLParser::'.$name.' is deprecated'); |
|
| 1080 | 1080 | $this->$name = $value; |
| 1081 | 1081 | break; |
| 1082 | 1082 | default: |
| 1083 | 1083 | /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout... |
| 1084 | 1084 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
| 1085 | - trigger_error('Undefined property via __set(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING); |
|
| 1085 | + trigger_error('Undefined property via __set(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING); |
|
| 1086 | 1086 | } |
| 1087 | 1087 | } |
| 1088 | 1088 | |
@@ -1090,11 +1090,11 @@ discard block |
||
| 1090 | 1090 | { |
| 1091 | 1091 | switch ($name) { |
| 1092 | 1092 | case 'accept': |
| 1093 | - $this->logDeprecation('Checking property XMLParser::' . $name . ' is deprecated'); |
|
| 1093 | + $this->logDeprecation('Checking property XMLParser::'.$name.' is deprecated'); |
|
| 1094 | 1094 | return isset($this->current_parsing_options['accept']); |
| 1095 | 1095 | case '_xh': |
| 1096 | 1096 | case 'xmlrpc_valid_parents': |
| 1097 | - $this->logDeprecation('Checking property XMLParser::' . $name . ' is deprecated'); |
|
| 1097 | + $this->logDeprecation('Checking property XMLParser::'.$name.' is deprecated'); |
|
| 1098 | 1098 | return isset($this->$name); |
| 1099 | 1099 | default: |
| 1100 | 1100 | return false; |
@@ -1106,18 +1106,18 @@ discard block |
||
| 1106 | 1106 | switch ($name) { |
| 1107 | 1107 | // q: does this make sense at all? |
| 1108 | 1108 | case 'accept': |
| 1109 | - $this->logDeprecation('Unsetting property XMLParser::' . $name . ' is deprecated'); |
|
| 1109 | + $this->logDeprecation('Unsetting property XMLParser::'.$name.' is deprecated'); |
|
| 1110 | 1110 | unset($this->current_parsing_options['accept']); |
| 1111 | 1111 | break; |
| 1112 | 1112 | case '_xh': |
| 1113 | 1113 | case 'xmlrpc_valid_parents': |
| 1114 | - $this->logDeprecation('Unsetting property XMLParser::' . $name . ' is deprecated'); |
|
| 1114 | + $this->logDeprecation('Unsetting property XMLParser::'.$name.' is deprecated'); |
|
| 1115 | 1115 | unset($this->$name); |
| 1116 | 1116 | break; |
| 1117 | 1117 | default: |
| 1118 | 1118 | /// @todo throw instead? There are very few other places where the lib trigger errors which can potentially reach stdout... |
| 1119 | 1119 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
| 1120 | - trigger_error('Undefined property via __unset(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_WARNING); |
|
| 1120 | + trigger_error('Undefined property via __unset(): '.$name.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_WARNING); |
|
| 1121 | 1121 | } |
| 1122 | 1122 | } |
| 1123 | 1123 | } |