$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,
'source_lang' => $element['source_language_code'],
'type' => substr( $element['element_type'], $this->type_prefix_length ),
);
$this->translation_ids_element[ $element['translation_id'] ] = $element_id;
}
foreach ( $element_ids as $element_id ) {
$trid = $this->element_data[ $element_id ]['trid'];
$this->trid_groups[ $trid ] = $element_ids;
$this->translations[ $element_id ] = &$this->trid_groups[ $trid ];
}
}
private function filter_for_actual_trans( $element_id ) {
$res = $this->translations[ $element_id ];
foreach ( $res as $lang => $element ) {
if ( $this->element_data[ $element ]['source_lang'] !== $this->element_data[ $element_id ]['lang'] ) {
// 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 | pt-pt |
| Key | Value |
| SERVER_SOFTWARE | nginx/1.27.5 |
| REQUEST_URI | /pt-pt/novidades |
| HOSTNAME | 5a2ab1108279 |
| 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.23 |
| 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.23.tar.xz.asc |
| WORDPRESS_DB_HOST | db:3306 |
| PHP_URL | https://www.php.net/distributions/php-8.4.23.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 | 1ab9f52008414e43bb2427ffa288eff2a4de39e1a830f957e800ba368d887a72 |
| USER | www-data |
| HTTP_X_REAL_IP | 172.70.162.87 |
| HTTP_X_FORWARDED_SERVER | 93c0286435db |
| HTTP_X_FORWARDED_PORT | 443 |
| HTTP_CF_VISITOR | {\"scheme\":\"https\"} |
| HTTP_CF_RAY | a3c3ff9edf3c8020-LHR |
| HTTP_CF_IPCOUNTRY | US |
| HTTP_CF_CONNECTING_IP | 216.73.216.64 |
| 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.70.162.87, 172.18.0.2 |
| 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 | 55592 |
| REMOTE_ADDR | 172.18.0.2 |
| 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 | 1789604986.7518 |
| REQUEST_TIME | 1789604986 |
| argv | Array ( ) |
| argc | 0 |
| Key | Value |
| HOSTNAME | 5a2ab1108279 |
| 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.23 |
| 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.23.tar.xz.asc |
| WORDPRESS_DB_HOST | db:3306 |
| PHP_URL | https://www.php.net/distributions/php-8.4.23.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 | 1ab9f52008414e43bb2427ffa288eff2a4de39e1a830f957e800ba368d887a72 |
| USER | www-data |
| HTTP_X_REAL_IP | 172.70.162.87 |
| HTTP_X_FORWARDED_SERVER | 93c0286435db |
| HTTP_X_FORWARDED_PORT | 443 |
| HTTP_CF_VISITOR | {"scheme":"https"} |
| HTTP_CF_RAY | a3c3ff9edf3c8020-LHR |
| HTTP_CF_IPCOUNTRY | US |
| HTTP_CF_CONNECTING_IP | 216.73.216.64 |
| 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.70.162.87, 172.18.0.2 |
| 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 | 55592 |
| REMOTE_ADDR | 172.18.0.2 |
| 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 | /pt-pt/novidades |
| SCRIPT_NAME | /index.php |
| CONTENT_LENGTH | |
| CONTENT_TYPE | |
| REQUEST_METHOD | GET |
| QUERY_STRING | |
| FCGI_ROLE | RESPONDER |
| PHP_SELF | /index.php |
| REQUEST_TIME_FLOAT | 1789604986.7518 |
| REQUEST_TIME | 1789604986 |
| argv | Array ( ) |
| argc | 0 |