Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use PCRE instead of ereg_* functions (Olle Jonsson, Bug #17726).

git-svn-id: http://svn.php.net/repository/pear/packages/SOAP/trunk@302446 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit f13fb7cb846f7f5e711231e7aba013400153b6c1 1 parent 3a5d890
Jan Schneider authored
View
2  Disco.php
@@ -366,7 +366,7 @@ function _getTypeNs($type)
$this->_wsdl['definitions']['attr']['xmlns:' . $ns_pref] = $m[1][0];
}
$typens = $this->namespaces[$m[1][0]];
- $type = ereg_replace($m[0][0],'',$type);
+ $type = preg_replace('/'.$m[0][0].'/', '', $type);
} else {
$typens = 'xsd';
}
View
2  Parser.php
@@ -378,7 +378,7 @@ function _startElement($parser, $name, $attrs)
$this->message[$pos]['arrayType'] = $vqn->name;
} elseif ($kqn->name == 'offset') {
- $this->message[$pos]['arrayOffset'] = split(',', substr($value, 1, strlen($value) - 2));
+ $this->message[$pos]['arrayOffset'] = explode(',', substr($value, 1, strlen($value) - 2));
} elseif ($kqn->name == 'id') {
// Save id to reference array.
View
4 Transport/HTTP.php
@@ -269,13 +269,13 @@ function _parseHeaders($headers)
{
/* Largely borrowed from HTTP_Request. */
$this->result_headers = array();
- $headers = split("\r?\n", $headers);
+ $headers = preg_split("/\r?\n/", $headers);
foreach ($headers as $value) {
if (strpos($value, ':') === false) {
$this->result_headers[0] = $value;
continue;
}
- list($name, $value) = split(':', $value);
+ list($name, $value) = explode(':', $value);
$headername = strtolower($name);
$headervalue = trim($value);
$this->result_headers[$headername] = $headervalue;
View
4 Type/duration.php
@@ -141,7 +141,7 @@ function mkduration($n, $Y, $Mo, $D, $H, $Mi, $S)
function duration_to_unix($duration)
{
- if (ereg('(-)?P([0-9]+Y)?([0-9]+M)?([0-9]+D)?T?([0-9]+H)?([0-9]+M)?([0-9]+S)?', $duration, $regs)) {
+ if (preg_match('/(-)?P([0-9]+Y)?([0-9]+M)?([0-9]+D)?T?([0-9]+H)?([0-9]+M)?([0-9]+S)?/', $duration, $regs)) {
return SOAP_Type_duration::mkduration($regs[1], $regs[2], $regs[3], $regs[4], $regs[5], $regs[6], $regs[7]);
}
return false;
@@ -149,7 +149,7 @@ function duration_to_unix($duration)
function is_duration($duration)
{
- return ereg('(-)?P([0-9]+Y)?([0-9]+M)?([0-9]+D)?T?([0-9]+H)?([0-9]+M)?([0-9]+S)?', $duration, $regs);
+ return preg_match('/(-)?P([0-9]+Y)?([0-9]+M)?([0-9]+D)?T?([0-9]+H)?([0-9]+M)?([0-9]+S)?/', $duration, $regs);
}
function _test($time)
View
2  WSDL.php
@@ -947,7 +947,7 @@ function _getDeepestArrayType($nsPrefix, $arrayType)
{
static $trail = array();
- $arrayType = ereg_replace('\[\]$', '', $arrayType);
+ $arrayType = preg_replace('/\[\]$/', '', $arrayType);
// Protect against circular references XXX We really need to remove
// trail from this altogether (it's very inefficient and in the wrong
View
1  package.xml
@@ -51,6 +51,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
* Rename QName::ns property to QName::prefix.
* Fix parsing multipart/related responses (Bugs #14756, #14854).
* Fix parsing certain WSDLs with attachments (Bill Blough, Bug #16968).
+* Use PCRE instead of ereg_* functions (Olle Jonsson, Bug #17726).
</notes>
<contents>
<dir baseinstalldir="SOAP" name="/">
Please sign in to comment.
Something went wrong with that request. Please try again.