diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index 5648381ff49..f3374c43234 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -50,6 +50,13 @@ Replace call to serialize_val with no bugged value * In all files, replace constructor names into __construct. Replace also parent::constructor_name with parent::__construct +* Line 4222 of file nusoap.php + + $rev = array(); + preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev); + $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")"; + + TCPDF: diff --git a/htdocs/includes/nusoap/lib/nusoap.php b/htdocs/includes/nusoap/lib/nusoap.php index a1fbd00051d..459f4aeb7b6 100644 --- a/htdocs/includes/nusoap/lib/nusoap.php +++ b/htdocs/includes/nusoap/lib/nusoap.php @@ -4219,8 +4219,10 @@ class nusoap_server extends nusoap_base { $payload .= $this->getDebugAsXMLComment(); } $this->outgoing_headers[] = "Server: $this->title Server v$this->version"; - preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); - $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")"; + // @CHANGE Fix for php8 + $rev = array(); + preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev); + $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")"; // Let the Web server decide about this //$this->outgoing_headers[] = "Connection: Close\r\n"; $payload = $this->getHTTPBody($payload); diff --git a/test/phpunit/WebservicesProductsTest.php b/test/phpunit/WebservicesProductsTest.php index 479fe5854de..b78650cc480 100644 --- a/test/phpunit/WebservicesProductsTest.php +++ b/test/phpunit/WebservicesProductsTest.php @@ -204,7 +204,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase print $soapclient->response; print "\n"; } - + print var_export($result, true); print __METHOD__." count(result)=".(is_array($result) ? count($result) : '')."\n"; $this->assertEquals('OK', $result['result']['result_code']);