mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 15:42:29 +01:00
Fix: functions "ereg", "ereg_replace", "eregi", "eregi_replace" is deprecated since php 5.3.0
This commit is contained in:
@@ -316,7 +316,7 @@ class nusoap_server extends nusoap_base {
|
||||
// get the character encoding of the incoming request
|
||||
if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){
|
||||
$enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1));
|
||||
if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){
|
||||
if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){
|
||||
$this->xml_encoding = strtoupper($enc);
|
||||
} else {
|
||||
$this->xml_encoding = 'US-ASCII';
|
||||
@@ -345,7 +345,7 @@ class nusoap_server extends nusoap_base {
|
||||
$enc = substr(strstr($v, '='), 1);
|
||||
$enc = str_replace('"', '', $enc);
|
||||
$enc = str_replace('\\', '', $enc);
|
||||
if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) {
|
||||
if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) {
|
||||
$this->xml_encoding = strtoupper($enc);
|
||||
} else {
|
||||
$this->xml_encoding = 'US-ASCII';
|
||||
@@ -379,7 +379,7 @@ class nusoap_server extends nusoap_base {
|
||||
$enc = substr(strstr($v, '='), 1);
|
||||
$enc = str_replace('"', '', $enc);
|
||||
$enc = str_replace('\\', '', $enc);
|
||||
if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) {
|
||||
if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) {
|
||||
$this->xml_encoding = strtoupper($enc);
|
||||
} else {
|
||||
$this->xml_encoding = 'US-ASCII';
|
||||
@@ -805,7 +805,7 @@ class nusoap_server extends nusoap_base {
|
||||
if (strpos($headers['content-type'], '=')) {
|
||||
$enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1));
|
||||
$this->debug('Got response encoding: ' . $enc);
|
||||
if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){
|
||||
if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){
|
||||
$this->xml_encoding = strtoupper($enc);
|
||||
} else {
|
||||
$this->xml_encoding = 'US-ASCII';
|
||||
|
||||
Reference in New Issue
Block a user