mirror of
https://github.com/php/php-src.git
synced 2026-04-22 23:48:14 +02:00
1f42777927
The DB connection should be provided in all cases as the first argument. The overloaded function signatures will be removed in the future. Warn about this change. Part of https://wiki.php.net/rfc/deprecations_php_8_1.
22 lines
463 B
PHP
22 lines
463 B
PHP
<?php
|
|
|
|
function _skip_lc_messages($conn, $lc_messages = 'C')
|
|
{
|
|
if (!_set_lc_messages($conn, $lc_messages)) {
|
|
die("skip Cannot set LC_MESSAGES to '{$lc_messages}'\n");
|
|
}
|
|
}
|
|
|
|
function _set_lc_messages($conn, $lc_messages = 'C')
|
|
{
|
|
if (pg_fetch_result(pg_query($conn, "SHOW LC_MESSAGES"), 0, 0) != $lc_messages) {
|
|
if (!@pg_exec($conn, "SET LC_MESSAGES='{$lc_messages}'")) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
?>
|