Merge branch '3.4' into 4.4

* 3.4:
  account for is_numeric() behavior changes in PHP 8
  fix expected exception messages on PHP 8
This commit is contained in:
Fabien Potencier 2020-08-23 11:22:13 +02:00
commit 77418e712e
3 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ class MemcachedAdapterTest extends AdapterTestCase
$this->expectExceptionMessage('constant(): Couldn\'t find constant Memcached::');
} else {
$this->expectException('Error');
$this->expectExceptionMessage('Undefined class constant \'Memcached::');
$this->expectExceptionMessage('Undefined constant Memcached::');
}
MemcachedAdapter::createConnection([], [$name => $value]);

View File

@ -86,7 +86,7 @@ class MemcachedCacheTest extends CacheTestCase
$this->expectExceptionMessage('constant(): Couldn\'t find constant Memcached::');
} else {
$this->expectException('Error');
$this->expectExceptionMessage('Undefined class constant \'Memcached::');
$this->expectExceptionMessage('Undefined constant Memcached::');
}
MemcachedCache::createConnection([], [$name => $value]);

View File

@ -161,7 +161,7 @@ class Inline
return 'false';
case ctype_digit($value):
return \is_string($value) ? "'$value'" : (int) $value;
case is_numeric($value):
case is_numeric($value) && false === strpos($value, "\n"):
$locale = setlocale(LC_NUMERIC, 0);
if (false !== $locale) {
setlocale(LC_NUMERIC, 'C');