}
$elements = $this->wpdb->get_results( $sql, ARRAY_A ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$this->populate_cache( $elements );
if ( $element_id && ! isset( $this->translations[ $element_id ] ) ) {
$this->translations[ $element_id ] = array();
}
}
return ! empty( $this->translations[ $element_id ] );
}
private function group_and_populate_cache( $elements ) {
$trids = array();
foreach ( $elements as $element ) {
$trid = $element['trid'];
if ( ! isset( $trids[ $trid ] ) ) {
$trids[ $trid ] = array();
}
$trids[ $trid ][] = $element;
}
foreach ( $trids as $trid_group ) {
$this->populate_cache( $trid_group );
}
}
private function populate_cache( $elements ) {
if ( ! $elements ) {
return;
}
$element_ids = array();
foreach ( $elements as $element ) {
$element_id = $element['element_id'];
$language_code = $element['language_code'];
$element_ids[ $language_code ] = $element_id;
$this->element_data[ $element_id ] = array(
'translation_id' => $element['translation_id'],
'trid' => $element['trid'],
'lang' => $language_code,
// work on silenced errors.
return false;
}
/**
* Special case to deal with Fatal errors and the like.
*/
public function handleShutdown()
{
// If we reached this step, we are in shutdown handler.
// An exception thrown in a shutdown handler will not be propagated
// to the exception handler. Pass that information along.
$this->canThrowExceptions = false;
$error = $this->system->getLastError();
if ($error && Misc::isLevelFatal($error['type'])) {
// If there was a fatal error,
// it was not handled in handleError yet.
$this->allowQuit = false;
$this->handleError(
$error['type'],
$error['message'],
$error['file'],
$error['line']
);
}
}
/**
* In certain scenarios, like in shutdown handler, we can not throw exceptions
* @var bool
*/
private $canThrowExceptions = true;
private function resolveHandler($handler)
{
if (is_callable($handler)) {
$handler = new CallbackHandler($handler);
}
| Key | Value |
| wp-wpml_current_language | es |
| Key | Value |
| SERVER_SOFTWARE | nginx/1.27.5 |
| REQUEST_URI | /es/news/ |
| HOSTNAME | 5411283e3761 |
| PHP_INI_DIR | /usr/local/etc/php |
| HOME | /var/www |
| PHP_LDFLAGS | -Wl,-O1 -pie |
| PHP_CFLAGS | -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
| PHP_VERSION | 8.4.27 |
| WORDPRESS_DB_PASSWORD | ey702lvwv61DqXxKNLsvAL0AbyJyPXpA |
| GPG_KEYS | AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6 0616E93D95AF471243E26761770426E17EBBB3DD |
| PHP_CPPFLAGS | -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
| PHP_ASC_URL | https://www.php.net/distributions/php-8.4.27.tar.xz.asc |
| WORDPRESS_DB_HOST | db:3306 |
| PHP_URL | https://www.php.net/distributions/php-8.4.27.tar.xz |
| WORDPRESS_DB_USER | tourpartnergroup_3876311 |
| PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| WORDPRESS_DB_NAME | tourpartnergroup |
| PHPIZE_DEPS | autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c |
| PWD | /var/www/html |
| PHP_SHA256 | dcf93923b0e38e0d5252b25b796520b5a47761a08b3488b6d0b5d1115764d3f0 |
| USER | www-data |
| HTTP_X_REAL_IP | 172.71.178.8 |
| HTTP_X_FORWARDED_SERVER | 93c0286435db |
| HTTP_X_FORWARDED_PORT | 443 |
| HTTP_CF_VISITOR | {\"scheme\":\"https\"} |
| HTTP_CF_RAY | a5404dd20b6f3a24-LHR |
| HTTP_CF_IPCOUNTRY | US |
| HTTP_CF_CONNECTING_IP | 216.73.217.54 |
| HTTP_CDN_LOOP | cloudflare; loops=1 |
| HTTP_ACCEPT_ENCODING | gzip, br |
| HTTP_ACCEPT | */* |
| HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
| HTTP_HOST | tourpartnergroup.com |
| SCRIPT_FILENAME | /var/www/html/tourpartnergroup/public/index.php |
| HTTPS | on |
| HTTP_X_FORWARDED_FOR | 172.71.178.8, 172.18.0.3 |
| HTTP_X_FORWARDED_HOST | tourpartnergroup.com |
| HTTP_X_FORWARDED_PROTO | https |
| REDIRECT_STATUS | 200 |
| SERVER_NAME | tourpartnergroup.com |
| SERVER_PORT | 80 |
| SERVER_ADDR | 172.18.0.5 |
| REMOTE_PORT | 60550 |
| REMOTE_ADDR | 172.18.0.3 |
| GATEWAY_INTERFACE | CGI/1.1 |
| REQUEST_SCHEME | http |
| SERVER_PROTOCOL | HTTP/1.1 |
| DOCUMENT_ROOT | /var/www/html/tourpartnergroup/public |
| DOCUMENT_URI | /index.php |
| SCRIPT_NAME | /index.php |
| CONTENT_LENGTH | |
| CONTENT_TYPE | |
| REQUEST_METHOD | GET |
| QUERY_STRING | |
| FCGI_ROLE | RESPONDER |
| PHP_SELF | /index.php |
| REQUEST_TIME_FLOAT | 1793592778.6232 |
| REQUEST_TIME | 1793592778 |
| argv | Array ( ) |
| argc | 0 |
| Key | Value |
| HOSTNAME | 5411283e3761 |
| PHP_INI_DIR | /usr/local/etc/php |
| HOME | /var/www |
| PHP_LDFLAGS | -Wl,-O1 -pie |
| PHP_CFLAGS | -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
| PHP_VERSION | 8.4.27 |
| WORDPRESS_DB_PASSWORD | ey702lvwv61DqXxKNLsvAL0AbyJyPXpA |
| GPG_KEYS | AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6 0616E93D95AF471243E26761770426E17EBBB3DD |
| PHP_CPPFLAGS | -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
| PHP_ASC_URL | https://www.php.net/distributions/php-8.4.27.tar.xz.asc |
| WORDPRESS_DB_HOST | db:3306 |
| PHP_URL | https://www.php.net/distributions/php-8.4.27.tar.xz |
| WORDPRESS_DB_USER | tourpartnergroup_3876311 |
| PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| WORDPRESS_DB_NAME | tourpartnergroup |
| PHPIZE_DEPS | autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c |
| PWD | /var/www/html |
| PHP_SHA256 | dcf93923b0e38e0d5252b25b796520b5a47761a08b3488b6d0b5d1115764d3f0 |
| USER | www-data |
| HTTP_X_REAL_IP | 172.71.178.8 |
| HTTP_X_FORWARDED_SERVER | 93c0286435db |
| HTTP_X_FORWARDED_PORT | 443 |
| HTTP_CF_VISITOR | {"scheme":"https"} |
| HTTP_CF_RAY | a5404dd20b6f3a24-LHR |
| HTTP_CF_IPCOUNTRY | US |
| HTTP_CF_CONNECTING_IP | 216.73.217.54 |
| HTTP_CDN_LOOP | cloudflare; loops=1 |
| HTTP_ACCEPT_ENCODING | gzip, br |
| HTTP_ACCEPT | */* |
| HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
| HTTP_HOST | tourpartnergroup.com |
| SCRIPT_FILENAME | /var/www/html/tourpartnergroup/public/index.php |
| HTTPS | |
| HTTP_X_FORWARDED_FOR | 172.71.178.8, 172.18.0.3 |
| HTTP_X_FORWARDED_HOST | tourpartnergroup.com |
| HTTP_X_FORWARDED_PROTO | https |
| REDIRECT_STATUS | 200 |
| SERVER_NAME | tourpartnergroup.com |
| SERVER_PORT | 80 |
| SERVER_ADDR | 172.18.0.5 |
| REMOTE_PORT | 60550 |
| REMOTE_ADDR | 172.18.0.3 |
| SERVER_SOFTWARE | nginx/1.27.5 |
| GATEWAY_INTERFACE | CGI/1.1 |
| REQUEST_SCHEME | http |
| SERVER_PROTOCOL | HTTP/1.1 |
| DOCUMENT_ROOT | /var/www/html/tourpartnergroup/public |
| DOCUMENT_URI | /index.php |
| REQUEST_URI | /es/news/ |
| SCRIPT_NAME | /index.php |
| CONTENT_LENGTH | |
| CONTENT_TYPE | |
| REQUEST_METHOD | GET |
| QUERY_STRING | |
| FCGI_ROLE | RESPONDER |
| PHP_SELF | /index.php |
| REQUEST_TIME_FLOAT | 1793592778.6232 |
| REQUEST_TIME | 1793592778 |
| argv | Array ( ) |
| argc | 0 |