Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined array key "country"

Exception

ErrorException

Show exception properties
ErrorException {#12635
  #severity: E_WARNING
}
  1.         if (!$ip) {
  2.             $ip self::getUserIP();
  3.         }
  4.         $reader = new Reader(WF301_PLUGIN_DIR '/misc/geo-country.mmdb');
  5.         $ip_data $reader->get($ip);
  6.         $country = isset($ip_data) && is_array($ip_data) ? $ip_data['country']['names']['en'] : '';
  7.         $reader->close();
  8.         return $country;
  9.     }
  1.      * @throws \ErrorException
  2.      */
  3.     public function handleError($level$message$file ''$line 0$context = [])
  4.     {
  5.         try {
  6.             parent::handleError($level$message$file$line$context);
  7.         } catch (Throwable $e) {
  8.             if (! apply_filters('acorn/throw_error_exception'true$e)) {
  9.                 return false;
  10.             }
  1.         if (!$ip) {
  2.             $ip self::getUserIP();
  3.         }
  4.         $reader = new Reader(WF301_PLUGIN_DIR '/misc/geo-country.mmdb');
  5.         $ip_data $reader->get($ip);
  6.         $country = isset($ip_data) && is_array($ip_data) ? $ip_data['country']['names']['en'] : '';
  7.         $reader->close();
  8.         return $country;
  9.     }
  1.                 'url' => $url,
  2.                 'sent_to' => $url_to,
  3.                 'agent' => isset($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:'',
  4.                 'referrer' => isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:'',
  5.                 'redirect_id' => $redirect_id,
  6.                 'location' => WF301_utility::getUserCountry(),
  7.                 'ip' => WF301_utility::getUserIP(),
  8.                 'auto' => $auto?1:0
  9.             );
  10.         } else {
  11.             $redirect = array(
  1.                     } else {
  2.                         $to .= '?' $query_string;
  3.                     }
  4.                 }
  5.                 WF301_logs::log_redirect($redirect->idself::get_url(), $to$redirect->last_countfalse);
  6.                 header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
  7.                 header("Cache-Control: post-check=0, pre-check=0"false);
  8.                 header("Pragma: no-cache");
  9.                 if ($redirect->type == 'cloaking') {
  1.                 // Avoid the array_slice() if possible.
  2.                 if ( === $the_['accepted_args'] ) {
  3.                     $value call_user_func$the_['function'] );
  4.                 } elseif ( $the_['accepted_args'] >= $num_args ) {
  5.                     $value call_user_func_array$the_['function'], $args );
  6.                 } else {
  7.                     $value call_user_func_array$the_['function'], array_slice$args0$the_['accepted_args'] ) );
  8.                 }
  9.             }
  10.         } while ( false !== next$this->iterations$nesting_level ] ) );
  1.      *
  2.      * @param array $args Parameters to pass to the callback functions.
  3.      */
  4.     public function do_action$args ) {
  5.         $this->doing_action true;
  6.         $this->apply_filters''$args );
  7.         // If there are recursive calls to the current action, we haven't finished it until we get to the last one.
  8.         if ( ! $this->nesting_level ) {
  9.             $this->doing_action false;
  10.         }
  1.     } elseif ( is_array$arg[0] ) && === count$arg[0] ) && isset( $arg[0][0] ) && is_object$arg[0][0] ) ) {
  2.         // Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
  3.         $arg[0] = $arg[0][0];
  4.     }
  5.     $wp_filter$hook_name ]->do_action$arg );
  6.     array_pop$wp_current_filter );
  7. }
  8. /**
  1.     /**
  2.      * Fires before determining which template to load.
  3.      *
  4.      * @since 1.5.0
  5.      */
  6.     do_action'template_redirect' );
  7. }
  8. /**
  9.  * Filters whether to allow 'HEAD' requests to generate content.
  10.  *
require_once('/var/www/vhosts/divido/subs/www-new/htdocs/wp-includes/template-loader.php') in /var/www/vhosts/divido/subs/www-new/htdocs/wp-blog-header.php (line 19)
  1.     // Set up the WordPress query.
  2.     wp();
  3.     // Load the theme template.
  4.     require_once ABSPATH WPINC '/template-loader.php';
  5. }
require('/var/www/vhosts/divido/subs/www-new/htdocs/wp-blog-header.php') in /var/www/vhosts/divido/subs/www-new/htdocs/index.php (line 17)
  1.  * @var bool
  2.  */
  3. define'WP_USE_THEMES'true );
  4. /** Loads the WordPress Environment and Template */
  5. require __DIR__ '/wp-blog-header.php';

Stack Trace

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)