ErrorException [ Warning ]: array_key_exists(): The first argument should be either a string or an integer

APPPATH/core/MY_Lang.php [ 154 ]

149     // default language: first element of $this->languages
150      function default_lang()
151  {
152   $browser_lang = !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ',') : '';
153   $browser_lang = substr($browser_lang, 0,2);
154   return (array_key_exists($browser_lang, $this->languages)) ? $browser_lang: 'nl';
155  }
156     
157     
158     // add language segment to $uri (if appropriate)
159     function localized($uri)
  1. {PHP internal call} » MY_Exceptions::error_handler(arguments)

  2. APPPATH/core/MY_Lang.php [ 154 ] » array_key_exists(arguments)

  3. APPPATH/core/MY_Lang.php [ 68 ] » MY_Lang->default_lang()

  4. SYSDIR/core/Common.php [ 166 ] » MY_Lang->MY_Lang()

  5. SYSDIR/core/CodeIgniter.php [ 197 ] » load_class(arguments)

  6. FCPATH/index.php [ 164 ] » require_once(arguments)

Environment

ErrorException [ Warning ]: array_key_exists(): The first argument should be either a string or an integer

APPPATH/core/MY_Lang.php [ 154 ]

149     // default language: first element of $this->languages
150      function default_lang()
151  {
152   $browser_lang = !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ',') : '';
153   $browser_lang = substr($browser_lang, 0,2);
154   return (array_key_exists($browser_lang, $this->languages)) ? $browser_lang: 'nl';
155  }
156     
157     
158     // add language segment to $uri (if appropriate)
159     function localized($uri)
  1. {PHP internal call} » MY_Exceptions::error_handler(arguments)

  2. APPPATH/core/MY_Lang.php [ 154 ] » array_key_exists(arguments)

  3. APPPATH/core/MY_Lang.php [ 72 ] » MY_Lang->default_lang()

  4. SYSDIR/core/Common.php [ 166 ] » MY_Lang->MY_Lang()

  5. SYSDIR/core/CodeIgniter.php [ 197 ] » load_class(arguments)

  6. FCPATH/index.php [ 164 ] » require_once(arguments)

Environment

ErrorException [ Warning ]: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/frank-trucks.be/httpdocs/application/core/MY_Exceptions.php:185)

APPPATH/core/MY_Lang.php [ 74 ]

69       
70       $uri = (!empty($this->uri)) ? $this->uri: $this->default_uri;
71           $uri = ($uri[0] != '/') ? '/'.$uri : $uri;
72       $new_url = $CFG->config['base_url'].$this->default_lang().$uri;
73       
74       header("Location: " . $new_url, TRUE, 302);
75       exit;
76      }
77     }
78 
79     
  1. {PHP internal call} » MY_Exceptions::error_handler(arguments)

  2. APPPATH/core/MY_Lang.php [ 74 ] » header(arguments)

  3. SYSDIR/core/Common.php [ 166 ] » MY_Lang->MY_Lang()

  4. SYSDIR/core/CodeIgniter.php [ 197 ] » load_class(arguments)

  5. FCPATH/index.php [ 164 ] » require_once(arguments)

Environment