Ref #16429 - PHP 8 error on preg_replace
47) PhpMyAdmin\Tests\Setup\ConfigGeneratorTest::testGetConfigFile TypeError: preg_replace(): Argument #3 ($subject) must be of type array|string, int given libraries/classes/Setup/ConfigGenerator.php:61 test/classes/Setup/ConfigGeneratorTest.php:55 vendor/phpunit/phpunit/phpunit:61 Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
723c0095b9
commit
cd3a0e46ce
@ -58,7 +58,7 @@ class ConfigGenerator
|
||||
$persistKeys = $cf->getPersistKeysMap();
|
||||
|
||||
foreach ($conf as $k => $v) {
|
||||
$k = preg_replace('/[^A-Za-z0-9_]/', '_', $k);
|
||||
$k = preg_replace('/[^A-Za-z0-9_]/', '_', (string) $k);
|
||||
$ret .= self::getVarExport($k, $v, $crlf);
|
||||
if (! isset($persistKeys[$k])) {
|
||||
continue;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user