ErrorException {#12635 #severity: E_WARNING }
if (!$ip) {
$ip = self::getUserIP();
}
$reader = new Reader(WF301_PLUGIN_DIR . '/misc/geo-country.mmdb');
$ip_data = $reader->get($ip);
$country = isset($ip_data) && is_array($ip_data) ? $ip_data['country']['names']['en'] : '';
$reader->close();
return $country;
}
* @throws \ErrorException
*/
public function handleError($level, $message, $file = '', $line = 0, $context = [])
{
try {
parent::handleError($level, $message, $file, $line, $context);
} catch (Throwable $e) {
if (! apply_filters('acorn/throw_error_exception', true, $e)) {
return false;
}
if (!$ip) {
$ip = self::getUserIP();
}
$reader = new Reader(WF301_PLUGIN_DIR . '/misc/geo-country.mmdb');
$ip_data = $reader->get($ip);
$country = isset($ip_data) && is_array($ip_data) ? $ip_data['country']['names']['en'] : '';
$reader->close();
return $country;
}
'url' => $url,
'sent_to' => $url_to,
'agent' => isset($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:'',
'referrer' => isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:'',
'redirect_id' => $redirect_id,
'location' => WF301_utility::getUserCountry(),
'ip' => WF301_utility::getUserIP(),
'auto' => $auto?1:0
);
} else {
$redirect = array(
} else {
$to .= '?' . $query_string;
}
}
WF301_logs::log_redirect($redirect->id, self::get_url(), $to, $redirect->last_count, false);
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
if ($redirect->type == 'cloaking') {
// Avoid the array_slice() if possible.
if ( 0 === $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $hook_name ]->do_action( $arg );
array_pop( $wp_current_filter );
}
/**
/**
* Fires before determining which template to load.
*
* @since 1.5.0
*/
do_action( 'template_redirect' );
}
/**
* Filters whether to allow 'HEAD' requests to generate content.
*
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
ErrorException
|
---|
ErrorException: Undefined array key "country" at /var/www/vhosts/divido/subs/www-new/htdocs/wp-content/plugins/301-redirects/libs/utility.php:215 at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() (/var/www/vhosts/divido/subs/www-new/htdocs/wp-content/themes/orkara/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:49) at Roots\Acorn\Bootstrap\HandleExceptions->handleError() (/var/www/vhosts/divido/subs/www-new/htdocs/wp-content/plugins/301-redirects/libs/utility.php:215) at WF301_utility::getUserCountry() (/var/www/vhosts/divido/subs/www-new/htdocs/wp-content/plugins/301-redirects/libs/logs.php:54) at WF301_logs::log_redirect() (/var/www/vhosts/divido/subs/www-new/htdocs/wp-content/plugins/301-redirects/libs/functions.php:90) at WF301_functions::redirect() (/var/www/vhosts/divido/subs/www-new/htdocs/wp-includes/class-wp-hook.php:324) at WP_Hook->apply_filters() (/var/www/vhosts/divido/subs/www-new/htdocs/wp-includes/class-wp-hook.php:348) at WP_Hook->do_action() (/var/www/vhosts/divido/subs/www-new/htdocs/wp-includes/plugin.php:517) at do_action() (/var/www/vhosts/divido/subs/www-new/htdocs/wp-includes/template-loader.php:13) at require_once('/var/www/vhosts/divido/subs/www-new/htdocs/wp-includes/template-loader.php') (/var/www/vhosts/divido/subs/www-new/htdocs/wp-blog-header.php:19) at require('/var/www/vhosts/divido/subs/www-new/htdocs/wp-blog-header.php') (/var/www/vhosts/divido/subs/www-new/htdocs/index.php:17) |